Networking Forums

Networking Forums > Computer Networking > Linux Networking > epoll, and exceeding maximum sockets hangs process?

Reply
Thread Tools Display Modes

epoll, and exceeding maximum sockets hangs process?

 
 
Billy Joe
Guest
Posts: n/a

 
      09-15-2004, 06:13 PM
I'm having a problem with socket programming on Linux. I have many clients
connecting to a listen()ing socket. If I exceed the number of allowable
sockets for my process, accept() will still return a valid socket number.
The problem is that the entire process then stops receiving socket events.
The second a client disconnects and brings the server's socket count below
its maximum, the events start happening again.

The problem is that just exceeding the socket count hasn't been a reliable
indication for me - that is, I can't just hard-code this limit. First, it
may not be the same on every platform the application will run on. Second,
if a socket (a TCP client) is in any of the termination _WAIT states after
it has terminated, I'll be given the socket back but it still seems to
hang the server process. If I wait for them to expire it goes back to
normal.

What's going on, and is there some way I can identify either:
1) That I've hit the limit, so I can stop calling accept(), or
2) That I've EXCEEDED the limit and am now not getting events?

What I'd REALLY like to do is have the accept() call fail but that's not
happening. Also, why does socket 1027 affect socket 43? Shouldn't socket
43 continue operating normally, even if socket 1027 is past my limit?

Thanks,
Bill

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wget hangs: process never terminates ponga Linux Networking 4 04-26-2006 12:32 AM
Maximum number of open sockets Wagner Windows Networking 3 03-09-2006 01:43 PM
Stdin/stdout tunneling through sockets to child process under Win9X Bedrich Svoboda Windows Networking 3 12-06-2004 12:17 AM
Stdin/stdout tunneling through sockets to child process under Win9X Bedrich Svoboda Windows Networking 3 12-06-2004 12:17 AM
My computer hangs when file sharing in process Martin Broadband Hardware 0 08-28-2004 06:28 PM



1 2 3 4 5 6 7 8 9 10 11