Max threads on Tomcat with Jruby


#1

Getting the following error on Tomcat, anyone know how to address this?
Should I be receiving this ?
SEVERE: All threads (200) are currently busy, waiting. Increase
maxThreads
(200) or check the servlet status

Thx
Adam


#2

AD wrote:

Getting the following error on Tomcat, anyone know how to address this?
Should I be receiving this ?

SEVERE: All threads (200) are currently busy, waiting. Increase
maxThreads (200) or check the servlet status

Hmm, that’s not good…it seems to be gobbling up worker threads and not
releasing them. Can you get a stack dump? Usually Ctrl+| or Ctrl+Break,
or send SIGQUIT.

This can happen for a few reasons…

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#3

Very strange…JRuby isn’t referenced once in that stack dump. I’d
expect it to be there somewhere. Something is keeping all these threads
alive but apparently not allowing them to process requests. Is it
possible the server is just overloaded? 200 threads seems like a lot to
actually be overloaded.

What versions of JRuby, Warbler, Rails, etc?

AD wrote:

not releasing them. Can you get a stack dump? Usually Ctrl+| or

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#4

thanks charles, pastie link here
http://pastie.org/305167

We are getting a high number of reqeusts, but they seem to just be
failing.

Adam

On Fri, Oct 31, 2008 at 3:13 PM, Charles Oliver N. <


#5

Jruby 1.1.4, Warbler 9.11, Rails 2.1.1

That is odd that there is no mention of JRuby. I realized afterwards
that
someone had a load test running, but i am not sure what is holding up
the
threads.

Is there any way in JConsole to figure out what processes are hanging?
We
will be running this load test again and would like to be able to
diagnose
it if it happens again.

Also this is tomcat 5.5, with a heap size of 5Gb on a machine with 8Gb
of
ram, proxied behind an apache front with mod_proxy_balancer.

Adam

On Fri, Oct 31, 2008 at 4:09 PM, Charles Oliver N. <


#6

My very, very rough guess is that as threads are spun up to handle
requests, they’re getting held by “something” and never going away when
Tomcat decides they should die. Because of this, the total number of
threads grows to the maximum and Tomcat refuses to spawn anymore.

Load testing could cause this to happen even without “something”
incorrectly holding references, but again 200 threads seems hig enough
you shouldn’t see this problem.

My next recommendation would be to get the server to that state and try
to dump the heap (jmap is one good tool, and Sybase has another) to see
what the state of memory actually looks like.

It’s also worth noting all those threads do seem to be working but
they’re blocking on some object, as if they’re in a pool, idle, ready
for the next job. The mystery is why Tomcat thinks they’re not ready.

You might want to ask on a Tomcat list too…they probably have some
insight into how to investigate this problem.

  • Charlie

AD wrote:

Also this is tomcat 5.5, with a heap size of 5Gb on a machine with 8Gb
Is it possible the server is just overloaded? 200 threads seems like
We are getting a high number of reqeusts, but they seem to just

       not releasing them. Can you get a stack dump? Usually Ctrl+| or
         http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#7

Hi all,
to fing out what workers are hanging on You can use tomcat manager,
there is a link “Server Status” which displays the state of all workers,
there You can see what specific action/uri is causing such problems.
Then You can just use load test with only this action and find out the
hot spot in it.

200 workers is not small but it’s also not huge - it’s just default.

Best greetings,
Pawe³ Wielgus.

2008/11/1 Charles Oliver N. removed_email_address@domain.invalid: