"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi, I can confirm your observations (SuSE 11.1, perl v5.10.0). Seems that your writer.pl is just too fast and consumes a lot of system resources. When writer.pl dies, netstat -n lists some 26k of TIME_WAIT connections for port 7070. If the client allows the sever some time to recover (I used a select(undef,undef,undef,0.0001); after the $i++ in writer.pl), then there's no problem. Runs, and runs, and runs,....while netstat reports something around 13k TIME_WAIT connections, so a kind of equilibrium has been reached. Change the die() statement in writer.pl to die "Could not connect - $!\n" unless $socket and run writer.pl without the select(...) delay using: After a while, writer.pl dies and you'll see something like: ...meaning, that there were temporarily too few resources left and netstat reported something around 28k connections (nearly all of them in TIME_WAIT state indicating a proper disconnection plus guard time). Update: After a while, resources become available again and you can re-start writer.pl successfully. HTH In reply to Re: IO::Socket disconnects in loop
by Perlbotics
|
|