I do recall there being many issues with rails 2.x around thread safety.
I assume that your application is running with “config.threadsafe!”?
Does the concurrent modification error also happen due to connection
It looks like there are not enough connections in the pool to satisfy
the number of concurrent requests tomcat is dispatching and/or some
requests take too long, which causes other threads to timeout.
Have you tried increasing the checkout_timeout or the number of threads?
What version of JBoss are you using where everything seems to work fine?
If I recall correctly it uses tomcat as the servlet container. Are the
versions and configuration the same (eg maxSpareThreads)
Sent from my mobile device. Please excuse any errors.
Adding upon Ariel’s suggestions - the concurrency issue your pointing
with the Hash is something that should be the first thing to look at.
Unfortunately we do not see the full trace … I’m guessing your
is not really thread-safe … working on an old version of JRuby + JBoss
does not mean it was all fine.
Maybe you’ve run with JRuby-Rack and it pools runtimes by default ? On
other hand Rails 2.3 is not 100% (depends on it’s usage) thread-safe
I’ve seen issues with the 2.3 connection pool not behaving consistently
when a connection is closed and re-required on the same thread (might
happen with the active_record session store).
I might be wrong in the end but do not expect to get all of this worked
if you’re just shooting (helped some and their issues were mostly
non-trivial - required understanding of the app on the level of user
or at least knowing the configuration/gems used) - it’s best to get
to look at the app or simply start with the “easy” fixes one thing at a
I’m not sure it’s only that - have tried to track down comparing against
3.2, but it’s not straight-forward since code got “re-invented”
I’ve ended up carefully back-porting AR’s 3.2 pool with AR-JDBC 1.3.x
Rails 2.3 and it worked without any (production) issues.
The other thing we should have noted as well and I certainly recommend (
although I’m biased is to upgrade AR-JDBC to 1.3.x since some parts
previously not completely AR compatible might cause issues with some
adapters as well (e.g. reconnect!).
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.