|Don't ask to ask, just ask|
Socket hang. (Windows or Perl? Solutions?) (Updated)by BrowserUk (Pope)
|on Apr 05, 2011 at 20:01 UTC||Need Help??|
BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
This creates server and client sockets in separate threads--though the threading is not a factor in the problem--and the client repeatedly connects; send a packet; receives a packet; and then disconnects before repeating.
Initially on my system, this runs smoothly at around 500 connects/second, but somewhere usually between 8000 and 16000 cycles, it just grinds to a halt. And stays that way for an extended period before suddenly starting to run again and then freezing again.
This appears to be a problem with the tcpip subsystem as there are lots of open connections hanging around during the freeze periods that are in the SYN_SENT state.
Thanks for any pointers.
Updated code to remove Win32 dependency; and ditched the stack size arg (just in case).
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.