Pushing the limits of stream_socket_server() and stream_select()



Just curious what people found the limits to be with stream_socket_server(), in terms of maximum concurrent connections, packet sizes, etc. I'm am presently stress-testing a multi-client socket server and am finding I can sometimes break it with as few as 100 concurrent connections, and always break it with [precisely] 252 connections--with a variety of errors getting thrown:

Client-side (>100 connections, sometimes):
PHP Warning: stream_socket_client(): unable to connect to tcp:// 192.168.0.41:2222 (Operation timed out) in /Tuning/client.php on line 3
PHP Notice: fwrite(): send of 68 bytes failed with errno=32 Broken pipe in /Tuning/client.php on line 14

Server-side error ( 252+ connections, every time):
PHP Warning: stream_select(): supplied argument is not a valid stream resource in /Tuning/server.php on line 15

Interestingly, the above server-side error only occurs when 252 clients are connected. At 251, it's okay. At 252, it generates the above PHP Warning. (Which really is strange. Anyone have any ideas?)

If anyone is interested, I will post the sample code I'm using, in case--perish the thought--the problem is self-inflicted. :-)

....Rene
.



Relevant Pages

  • Re: TS Licensing & Remote Desktop Connection
    ... I only need the 'standard' Remote ... Desktop for Administration. ... licenses, but it allows only 2 + 1 concurrent connections, by ...
    (microsoft.public.windows.terminal_services)
  • RE: Another Allocated Memory Alert Question
    ... much memory the server was consuming. ... Unless this is normal for SQL to do this. ... My concurrent connections right now is unlimited. ...
    (microsoft.public.windows.server.sbs)
  • Re: Small Business Server 2003 licensing
    ... Order the ammount of CALS you need, ... >your estimate on concurrent connections for your network. ... >Licenses are for concurrent connections to the server, ...
    (microsoft.public.windows.server.sbs)
  • Re: Set concurrent connections on share
    ... > I am actually looking at the WMI, but I see NO WAY to limit connections on ... concurrently connect to that share in order to launch the exe. ... > license fee for concurrent connections and we wanted to run a win services ... > If you have some ideas (wmi, ...
    (microsoft.public.dotnet.security)
  • Re: [PHP] Pushing the limits of stream_socket_server() and stream_select()
    ... stream_socket_server, in terms of maximum concurrent connections, packet sizes, etc. I'm am presently stress-testing a multi-client socket server and am finding I can sometimes break it with as few as 100 concurrent connections, and always break it with ... it generates the above PHP Warning. ...
    (php.general)