Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

JRubyRack and tomcat hung out #68

Closed
purbon opened this Issue · 2 comments

3 participants

@purbon

Our app is using jruby-rack-1.0.10.jar and jruby-core-1.6.4.jar throw warbler, its working quite find but sometimes we get stuck and our application is never more answering any new request until we restart tomcat.

Also we had some errors into our log that make be believe the problem is related with rack, but have no more data on that.

Please if this is not the correct place for that query/report feel free to drive me to the correct one, or If you need more info in order to debug it, please ask me!.

Thanks

-----------
INFO: Illegal access: this web application instance has been stopped already.  Could not load org.jruby.RubyFixnum.     The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
-----------
-----------
:1 warning: already initialized constant RackBaseInput
:1 warning: already initialized constant RackBaseInput
:1 warning: already initialized constant RackBaseInput
:1 warning: already initialized constant RackBaseInput
:1 warning: already initialized constant RackBaseInput
WARNING: while creating new bindings for class org.jruby.rack.input.RackBaseInput,
found an existing binding; you may want to run a clean build.
WARNING: while creating new bindings for class org.jruby.rack.input.RackBaseInput,
found an existing binding; you may want to run a clean build.
WARNING: while creating new bindings for class org.jruby.rack.input.RackBaseInput,
found an existing binding; you may want to run a clean build.
-----------
@kares
Collaborator

This is most likely a class-loader issue, although I'm not necessarily 100% sure.
I do have a previous similar experience with trinidad (uses tomcat 7) while doing hot redeploys of a non-trivial rails app.
I even did some heap dumping trying to resolve this, I found a "static" variable candidate in JRuby itself but fixing it still wasn't enough. Than I couldn't get my head into what might still be holding back memory from being released and I stopped digging.

I guess we're going to need a minimal Rails app setup where we can easily explore this further.

If you're redeploying the war, than doing a tomcat restart each time you deploy might avoid this, or assign the server more memory and restart it once every 3 hot deploys if you need to avoid restarts as much as possible.
Sorry for any inconvenience, but this is an old Java class-loading hustle, in this case it even might be tomcat specific.
If you find out any additional info or have log outputs where stack traces are printer out, feel welcome to comment.

@kares kares closed this
@c0mrade

I'm experiencing the same thing with tomcat 8 now, do you have any more ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.