could not accept socket
I'm having this intermittent problem with a server program I wrote, and every couple of weeks, it terminates because it fails in attempting to accept a socket. I am using a C++ wrapper class for the traditional unix socket api, and my machines which run the server are behind a barracuda load balancer. I suspect the load balancer of causing this problem, but have no proof of it. it is also possible that there is some sort of attack being perpetrated on my server, but there is no evidence of this. Is there any bug in the linux 2.6.x kernel that causes a system to run out of sockets over time? generally, my server will successfully accept thousands of connections before displaying this problem, so I doubt it's an issue with my code.
2x Dell PowerEdge 6850/4x dual core 2.66GHz CPU/16GB RAM
OpenSUSE 10.3 release/Kernel 22.214.171.124-31
Are you sure that your program closes sockets and frees other resourses as it should?
there is 65000 ports available ;) so maybe you accept new connections till you use all the ports not freeing any?
I hear you knockin, but the server only listens on one port. is it possible that each connection it hands off to a child process uses another port? in any case, I'm 90% certain that I'm closing and freeing the sockets, but I'll definitely go through my code some more...
Originally Posted by vart
I do not believe in the socket closing bug of the linux kernel
Our SipServer program is developed for linux as well and could run stress of hundreds transactions per second during long hours without encountering problems like this...
I suppose - you need to check other resources that could be leaked in your application (maybe not in your code but in classes you are using without proper destructors or something)