New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Server should not hang on accept errors #172

Closed
nob13 opened this Issue Nov 23, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@nob13

nob13 commented Nov 23, 2012

I am evaluating cpp-netlib for a future webserver project with a lot of long polling calls and so far it is really cool.

For doing some stress tests I issued several 10000 concurrent calls on it. When the test server reaches its max file limit (ulimit -n) it just debugs

[DEBUG [path]/boost/network/protocol/http/server/async_server.hpp:120]: Error accepting connection, reason: system:24

Code 24 is too many files open.

And then hangs :(

The problem is not that the error happens (of course I could increase my file limit) but that the server immediately stops working, because it doesn't aync_accept any more connections (in async_server.hpp). Without enabling debug output the user doesn't even see this error.

The problem exists in current master (as looking into the source) and in 0.9.4.

I am not sure what the "right" reaction would be, but even crashing would be better than just doing nothing anymore. Another approach would be to add some callback by async_server so that the progammer can decide whats best.

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Dec 17, 2012

Member

Sorry this took a while. I would much prefer that this be fixed one way or another, and would welcome pull requests to fix this. Would you mind sending a pull request in to 0.9-devel so that this can be included in a 0.9.5 release?

Member

deanberris commented Dec 17, 2012

Sorry this took a while. I would much prefer that this be fixed one way or another, and would welcome pull requests to fix this. Would you mind sending a pull request in to 0.9-devel so that this can be included in a 0.9.5 release?

@ghost ghost assigned deanberris Jul 3, 2013

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Jul 3, 2013

Member

I think this is worth addressing in a 0.10 release, and hopefully in 0.10.1 -- I'll take this on and see whether it can make it into 0.10.1.

Member

deanberris commented Jul 3, 2013

I think this is worth addressing in a 0.10 release, and hopefully in 0.10.1 -- I'll take this on and see whether it can make it into 0.10.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment