Tomcat + warbler issues

Sat down last night to do some quick stress testing mainly to verify
that config.threadsafe! is working as intended, and immediately ran
into something odd.

This is tomcat 6, jruby 1.6.1, rails 3.0.5 on ubuntu. I used apache
bench with a concurrency of 50 to do my tests. The behavior is that
requests take a very long time to finish, 1-4 seconds, but rails logs
report that they all finish in under 10ms. Tomcat manager is showing
that it is creating 50 threads and they are all handling requests.
The rails action is minimal, renders some text and it’s done.

I’m pretty sure only one request is being processed at a time, but no
idea why. In warbler.rb I have min.runtimes and max.runtimes set to

  1. The environment file has config.threadsafe!. What else could I be


Just to confirm it’s not our app, I ran it under webrick using the
same rails environment and it works as expected there, around 280
requests per second versus 18 requests per second under tomcat.


Here is the web.xml also. The only thing that’s different from a
default rails app is that our environment names don’t follow the
standard development, production, etc… They contain the settings you
would expect though. I know for instance the glassfish gem didn’t
handle this correctly. But I’ve verified that tomcat does start up
rails with the correct environments, stuff would blow up rather badly
if it didn’t.

public.root / rails.env game_production jruby.min.runtimes 1 jruby.max.runtimes 1 RackFilter org.jruby.rack.RackFilter RackFilter /* org.jruby.rack.rails.RailsServletContextListener

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs