Jeanfrancois Arcand wrote:
> Hi,
>
> Charles Oliver Nutter wrote:
>> We're getting reports that deploying JRuby on Rails apps (as WAR file)
>> to GF2 or Tomcat 6 seems to be leaking. We have not done much ground
>> work to investigate yet, but the reports also say that using Tomcat
>> 5.5 solves the problems...and we're deploying the exact same code in
>> both cases.
>>
>> Here's one such report; the other I've gotten is on IRC:
>>
>> http://archive.jruby.codehaus.org/dev/806313f00708211515t31a4a1efn734b532660b447b6@mail.gmail.com
>>
>>
>> How shall we go about investigating this? It's steered multiple people
>> away from using GF with JRuby on Rails already.
>
> Can you get an application that demonstrate the problem? Looks like a
> classloader leak....
I will look into that. If you can give me some description of how
classloaders could be a problem, I'd love to hear it. As you may know,
JRuby generates a lot of code at runtime as part of JIT compilation. In
most cases, a JITted method is generated into its own class, which in
turn has its own classloader (since there's no other way the class would
be GCable). If GF is holding on to created subclassloaders (or has
disabled class GC?) there could certainly be a problem, since Rails in
some cases continues to generates new methods even in production mode.
- Charlie