Forum: JRuby Rack timeout

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mike H. (Guest)
on 2008-12-06 09:17
(Received via mailing list)
In some perf tests I've run lately where I push our app, I've noticed
that as the JVM starts to reach the top of its heap Tomcat threads start
to pile up rapidly. I presume that at this stage they are contending for
a Rack runtime and can't get one. I think that perhaps this is what
ultimately knocks the JVM into out of memory land. Its already short on
memory and is accumulating threads at a rapid rate.

JVM becomes unresponsive with:

Dec 5, 2008 5:21:25 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception (java.lang.OutOfMemoryError: Java heap space)
executing org.apache.jk.common.ChannelSocket$SocketConnection@89cdd5d,
terminating thread
catalina.2008-12-05.log lines 2340-2371/2371 (END)

The default setting for: jruby.runtime.timeout.sec is 30 seconds. So
threads wait 30 seconds before being rejected.

I'm going to ratchet this value back and see if it helps. I'd rather
fail fast and save the JVM. Another option on Tomcat is putting a
maximum on the # of threads, but this seems more appropriate.

Anyway, my question is what are others doing with this timeout setting?

BTW, we've seen nice improvement in perf between 1.1.3 and 1.1.5. See:
http://fuzzypanic.blogspot.com/2008/12/trisano-per...

--
Mike H.
http://www.csinitiative.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Charles Oliver N. (Guest)
on 2008-12-07 13:03
(Received via mailing list)
Mike H. wrote:
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
> SEVERE: Caught exception (java.lang.OutOfMemoryError: Java heap space)
> executing org.apache.jk.common.ChannelSocket$SocketConnection@89cdd5d,
> terminating thread
> catalina.2008-12-05.log lines 2340-2371/2371 (END)

There's a good chance this is due to the bug Peter Chan reported, fixed
on trunk and in the jruby-1_1_6RC2 tag:

http://jira.codehaus.org/browse/JRUBY-3217

This will be in 1.1.6 this week, but you may want to try a build before
then. The nightlies are still based on trunk, but should be pretty
stable:

http://jruby.headius.com:8080/hudson/job/jruby-dist/

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.