开发者

Change the Passenger application pool size at runtime

Is it p开发者_如何学编程ossible to change the Passenger application pool size at runtime? Ie, without restarting apache, and without disrupting active visitors?

The same time every day we have a background job run. It is very memory intensive. Since during that time, traffic on the site tends to be relatively low, I would like to automatically scale down the number of application servers running just before the jobs runs, and then scale up again when it is finished.


Passenger should automatically shut down instances when they are not in use. Since your traffic is low then you should not have any unnecessary passenger instances running.

One variable you can tweak is PassengerPoolIdleTime. This tells passenger how long to wait before shutting down idle instances.

There is no PoolSize variable. There is however a MaxPoolSize but this limit should not be hit unless you are receiving heavy traffic.

You can find all the variables along with what they do here: http://www.modrails.com/documentation/Users%20guide.html

If you really want to change the settings dynamically, you can try calling sudo /etc/init.d/apache2 reload. This will tell apache to reload its settings, including the passenger configuration.

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜