|
There is what happened during GRACEFUL restart, while start a new instance of LSWS, the old LSWS tries to finish the current pending requests, so it need to keep the old Ruby processes alive, so, the old LSWS instance and ruby processes may not terminate immediately even the new LSWS instance is ready to serve new requests.
when pending request finished, old LSWS and ruby will stop.
It is the design of LSWS graceful restart. For your setup, you have to down tune rails "Max Connections" configuration to allow two sets of rails apps run in the memory. That's why you do not have problem during non-peak hour when less ruby processes are needed. You can experiment with "Max Connections" configuration.
Have you tried Ruby Enterprise? I think it should save memory for lsruby as well as we all do fork(), we have a chance to try it yet. Maybe need to add some special code to enable the copy-on-write optimization.
|