I've had a quick run through the GoldSpike code, and can't see anywhere that runtimes are referenced other than local variables. The runtime pool creates at least "minIdle" runtimes, and will create up to "maxObjects". However, as it stands it shouldn't decrease the number of runtimes available.

The logs should show "Runtime X loaded" every time a runtime is created.

Cheers,
Robert


Charles Oliver Nutter wrote:
Raphaël Valyi wrote:
Hi all,


Since even before JRuby 1.0, My JRuby on Rails app never lasted more
than 24 hours in prod env when while being browsed by Google and Yahoo
bots.

I investigated on this recently, and, while I'm not completely sure,
it seems that JRuby (from 1.0 to head; Java 6u2; Linux 2.6.18) doesn't
leak when using Webrick as a web server (In dev mode I'm using webrick
and never saw any leak while loading my server and profiling/garbage
collecting with JConsole.)

But with Goldspike, either under Glassfish v2, either under Tomcat 6,
it seems that I'v got a very little memory leak that ends crashing my
server.

With the JMeter load tool, I was able to fill my RAM (total 1 Go) by
sending as much as several thousands of requests (at 2 Req/sec, all
answered 200). And when letting my server in the WWW, It crashes in
about 24 hours or less but with less request (so may be the
variablitity has some influence).

I never saw any error in my Ruby log file.

It seems that the objects eating my RAM a(after jmap and jhat) are
Ruby arrays of integers. I don't know were they do come from, but I'm
quite sure they don't result from my specific code. My session dump is
clean too.

The [I were suspicious but I'm not sure they're the culprit. There's also a large number of constructs related to jregex, which does use [I for various things. Is it possible there's a regex leak somewhere?

Other than that...in GoldSpike do runtimes ever go away/get collected if not in use? Are there links from any server-wide state to the runtimes that might keep them from going away?

Raphael: Any way you can track how many JRoR runtimes might be spinning up in your process?

- Charlie
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to