epoll, and exceeding maximum sockets hangs process?

This is a discussion on epoll, and exceeding maximum sockets hangs process? within the Linux Networking forums, part of the Linux Forums category; I'm having a problem with socket programming on Linux. I have many clients connecting to a listen()ing socket. ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-15-2004
Billy Joe
 
Posts: n/a
Default epoll, and exceeding maximum sockets hangs process?

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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0