Skip to content
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

Can't handle a new request, too many request threads already #54

Closed
rapenne-s opened this issue Apr 9, 2013 · 4 comments
Closed

Can't handle a new request, too many request threads already #54

rapenne-s opened this issue Apr 9, 2013 · 4 comments

Comments

@rapenne-s
Copy link

Hello,

After running hunchentoot within Caveman framework, after a while I get this error :

Can't handle a new request, too many request threads already

and the server stop responding. I have this problem with latest hunchentoot package available on quicklisp at this time, and tried differents versions of SBCL but the problem is still the same.

It seems that doing some request with curl crash the server sooner than loading it with firefox.

I don't know what informations I can add to h elp.

@hanshuebner
Copy link
Member

Please provide detailed instructions to reproduce the suspected bug.

On Tue, Apr 9, 2013 at 10:30 AM, Zplay notifications@github.com wrote:

Hello,

After running hunchentoot within Caveman framework, after a while I get
this error :

Can't handle a new request, too many request threads already

and the server stop responding. I have this problem with latest
hunchentoot package available on quicklisp at this time, and tried
differents versions of SBCL but the problem is still the same.

It seems that doing some request with curl crash the server sooner than
loading it with firefox.

I don't know what informations I can add to h elp.


Reply to this email directly or view it on GitHubhttps://github.com//issues/54
.

@rapenne-s
Copy link
Author

First, create a caveman app and start it :

(ql:quickload :caveman)
(caveman.skeleton:generate #p"test")
(ql:quickload :test)
(test:start)

Start "apache benchmark" ab command :

ab -c 500 -n 1000 http://localhost:5000/

it'll breaks the app started. I know that 500 concurrents is BIG, but you can also try with -c 50 and press CTRL+C to break connections, 2 or 3 times doing it break the app too.

I am not sure it is a problem with hunchentoot. Caveman is using Clack which uses hunchentoot, but if I replace hunchentoot with fastcgi or mod_lisp, I can't reproduce something like that.

@hanshuebner
Copy link
Member

What do you mean by "break the app"? If you mean that requests end up in
error, then this is the expected behavior if you overload the server. If
you mean that the server crashes and never becomes responsive again, then
this would be something that needs to be fixed.

The message "Can't handle a new request, too many request threads already"
means just that. There is an upper limit on the number of concurrent
threads that Hunchentoot spawns to handle requests. If the default limit
of 100 is too low, you can set a different limit by instantiating the
taskmaster with a different :max-thread-count.

Please refer to the documentation (http://weitz.de/hunchentoot/#taskmasters)
to learn how taskmasters and load limiting works.

Please confirm whether this is a real bug or just a misunderstanding of how
load limiting in Hunchentoot works on your side.

On Tue, Apr 9, 2013 at 3:40 PM, Zplay notifications@github.com wrote:

First, create a caveman app and start it :

(ql:quickload :caveman)(caveman.skeleton:generate #p"test")(ql:quickload :test)(test:start)```
Start "apache benchmark" ab command : ab -c 500 -n 1000 http://localhost:5000/, it'll breaks the app started. I know that 500 concurrents is BIG, but you can also try with -c 50 and
press CTRL+C to break connections, 2 or 3 times doing it break the app too.
I am not sure it is a problem with hunchentoot. Caveman is using Clack using hunchentoot, but if I replace hunchentoot with fastcgi or mod_lisp, I can't reproduce something like that.


Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-16112947
.

@rapenne-s
Copy link
Author

Thank you for you quick answer. I have been looking deeper, the problem seems related to caveman/clack blocking somewhere, no hunchentoot can't do threads anymore. With caveman displaying a single character through hunchentoot, I can't overload it, display a big page and it get blocked after the "too many requests", it doesn't work anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants