For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > March 2006 > Socket limit?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Socket limit?
Rob Terrell

2006-03-14, 7:06 pm

I have a chat server that I wrote using POE::Component::Server::TCP.
It works great, except when it runs on Windows (ActiveState Perl)
there seems to be a limit to the number of sockets that communicate.
This is unrelated to the connection limit added in POE .33.

After 64 clients are connected and communicating, all additional
client connections seem to be accepted, but do not get serviced by
POE::Component::Server::TCP. When one of the existing connections
drops, then one of the "waiting" connections gets served.

Does anyone know why this might be? SOMAXCON appears to be = 5, which
POE .33 doesn't seem to use anymore.

Rocco Caputo

2006-03-14, 7:06 pm

On Mar 14, 2006, at 11:03, Rob Terrell wrote:

> I have a chat server that I wrote using
> POE::Component::Server::TCP. It works great, except when it runs on
> Windows (ActiveState Perl) there seems to be a limit to the number
> of sockets that communicate. This is unrelated to the connection
> limit added in POE .33.
>
> After 64 clients are connected and communicating, all additional
> client connections seem to be accepted, but do not get serviced by
> POE::Component::Server::TCP. When one of the existing connections
> drops, then one of the "waiting" connections gets served.
>
> Does anyone know why this might be? SOMAXCON appears to be = 5,
> which POE .33 doesn't seem to use anymore.


SOMAXCON defines the number of connections that can be waiting in the
listen/accept queue before the system drops new connections. It's
not a limitation on the number of active connections you can have.

My guess is that either ActivePerl or Winsock has a descriptor limit
in its select() implementation. POE doesn't care, and it'll happily
try to use more descriptors than your OS supports, if your
application lets it.

--
Rocco Caputo - rcaputo@pobox.com


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com