Jeff Barczewski wrote:
> With Rails-integration - is there a way (configuration option) to have 
> servlet preload the jruby on startup rather than waiting for first hit?
> 
> There is a delay on the first hit while waiting for jruby to spin up, so 
> I'd rather take that hit at startup.
> 
> Also this might prevent another error I have sporadically seen (usually 
> on the first time I hit page), I will often get in the logs an exception 
> Linkage error and sometimes it is sent back to the browser on the first 
> hit. Hitting the page again usually works fine.
> 
> So I am thinking that if I can spool things up on startup maybe I'll 
> avoid both of these issues and be ready for the first webpage hit.

Yeah, this has been discussed and something should be done for 1.2 
(Spike v1.2? :))

My proposal is as follows:

1. Start up a single runtime on deploy
2. When requests come in for which there's no available runtime, start 
another one spinning up...but allow that request to use whatever runtime 
gets put back into the pool first. This is because waiting for another 
request to complete will almost always be faster than waiting for a new 
runtime...but then that new runtime is available for other requests.

I think this would work best, with a minimal hit on startup and a 
reduced hit for requests against an empty pool.

Make it so!!

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

Reply via email to