Modrails tip – Increase RailsPoolIdleTime

We’ve been on mod_rails for nearly a week and I’ve been noticing a couple of strange problems.

First, every once and while I’d hit a page and it would come up blank. Second, looking at google’s sitemaps status page told me that certain pages were getting a connection refused error. Also, I noticed the number of requests per minute from Google had dropped. (We use gl_tail for real-time monitoring of our apache logs.)

Then I started thinking that maybe the application instances are taking too long to spin up? I hit one of our staging services which was not active under mod_rails and I got a blank page 🙁 . So I started combing the user documentation looking for something to set the minimum number of instances. (A quick google and I found that others have made similar requests.)

So then I discovered you can control when mod_rails chooses to shutdown idle instances using RailPoolIdleTime. We had were using the default of 120 seconds. It recommends you set the Idle time to 2 x average number of seconds a user spends on a page. With a little bit of playing around we set it to 600 seconds and found that to work best.

The results were almost instanteous, it took about 15 minutes before Google started crawling at the normal rate.

Mod_rails has been really easy to use so far. We’ve been happy with the performance (now that we’ve got some of the glitches out of the system) and we’re still hanging out for rubyentreprise.

Leave a Reply


http://www.canakkaleruhu.org http://www.vergimevzuati.org http://www.finansaldenetci.com http://www.securityweb.org http://www.siyamiozkan.org http://www.fatmaozkan.com http://www.sgk.biz.tr http://www.denetci.gen.tr http://www.bagimsizdenetim.biz.tr http://www.mevzuat.biz.tr http://www.security.biz.tr http://www.sorgulatr.com http://www.kanunlar.biz http://www.prsorgu.net http://www.sirabul.com http://www.emekliol.org http://www.coklupagerank.com http://www.coklupagerank.net http://www.coklupagerank.org http://www.prsorgu.org http://www.scriptencode.com http://www.sirabul.net http://www.sirabul.org http://www.sitenizanaliz.com http://www.seoisko.com http://www.seomavi.com http://www.scriptencode.net http://www.scriptencode.org