Resize passenger application pool at run time

Can I change the passenger application pool size at runtime? Those. without restarting apache and without breaking active visitors?

At the same time, we carry out a background task every day. It is very intense. Since the traffic on the site tends to be relatively low during this time, I would like to automatically scale the number of application servers that work immediately before starting the tasks, and then increase the scale when it is completed.

+3
source share
1 answer

The passenger should automatically turn off instances when not in use. Since your traffic is low, you will not need to run extra copies of passengers.

One variable that you can configure is PassengerPoolIdleTime. This tells the passenger how long to wait before closing unoccupied instances.

There is no PoolSize variable. However, there is MaxPoolSize, but this limit should not be hit unless you get 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 dynamically change the settings, you can try calling sudo /etc/init.d/apache2 reload. This will tell apache to reload its settings, including the passenger configuration.

Good luck

+1

Source: https://habr.com/ru/post/1735694/


All Articles