Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
bilalkhan #1
Member since Oct 2016 · 81 posts · Location: Pakistan
Group memberships: Members
Show profile · Link to this post
Subject: Configuration for socket enhancement/ How to improve concurrent connection on server
Currently, on every request we assign a new socket to the request, when the user request increased up to 400 login attempts get failed.



  1.  private void Listen()
  2.         {
  3.            
  4.                 socket.Listen(10000);
  5.                 isListening = true;
  6.  
  7.                 while (isListening)
  8.                 {
  9.                     allDone.Reset();
  10.                     socket.BeginAccept(new AsyncCallback(AcceptCallBack), socket);
  11.                     allDone.WaitOne();
  12.                 }
  13.          }
  14.  
  15.  private void AcceptCallBack(IAsyncResult arg)
  16.         {
  17.             allDone.Set();
  18.             Socket newSocket = socket.EndAccept(arg);
  19.             Task.Factory.StartNew(() =>
  20.             {
  21.  
  22.                 ConnectionManager con = new ConnectionManager(newSocket);//create a new connection for the request.
  23.  
  24.             });
  25.  
  26.  
  27.         }


we load test from JMETER connect
Login user to Server:Connect Error %32.85%

are we missing some configuration? before digging down in to code? is their any limit on socket creation ? any configuration which can improve the connect successfully?
This post was edited on 2017-08-24, 13:15 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
What is the exact exception you are getting?
There should be a message with more information in your exception.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS