Red Hat Bugzilla – Bug 971500
Sporadic web request failure under high load for Rails applications
Last modified: 2013-07-16 06:57:52 EDT
This is a product clone of the TorqueBox community bug https://issues.jboss.org/browse/TORQUE-1099
We have a race condition for Rails applications that manifests itself under high web request load. I've only been able to reproduce this for Rails application using page caching, but the potential is there for it to happen for all Rails applications. There is no known workaround right now.
The fix, in jboss-polyglot, is https://github.com/projectodd/jboss-polyglot/commit/775b1da2f1090391b5c754cba3183be6f433ccb2
Steps to reproduce copied from the upstream bug:
* Deploy a Rails application in production mode at the root context to TorqueBox
* Start TorqueBox
* Generate and sustain a high request load against an invalid URL for that Rails application (something that will 404) - ie http://localhost:8080/foo
* After the server is under load, create an empty foo.html file under $RAILS_ROOT/public/
* Remove the foo.html file shortly after creating it - ie touch public/foo.html && sleep 0.5 && rm public/foo.html
* You should see errors logged to the TorqueBox console or server.log with org.apache.naming.resources.ResourceCache near the top of the stack traces.
* You may need to stop TorqueBox, start it again, and do the whole touching / removing foo.html process again to display the problem. With a high enough load it seems to happen every time for me.
the fix is cherry picked as http://git.app.eng.bos.redhat.com/?p=wfk/polyglot.git;a=commitdiff;h=1e5b340385655247f505d059a6380c846270cd25
I cannot reproduce this bug (maybe due to some differences between my and your application or setting), but it seems that it should be fixed.