You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the following typical use case: Plone site with multiple instances running behind a web accelerator like Varnish, using memmon and httpok.
From time to time, memmon will need to restart an instance because of high memory consumption; Varnish has configured backend health check probes that test if the instances are available or not, and this probes have to play very nicely with the instances because requests hitting the backend are typically slow; for instance:
As restarting a Plone instance is a time consuming process (typically, around 30 seconds), Varnish will not notice the instance is down for some time and will continue sending requests; the instance then came in and will be flooded with a lot of pending requests from Varnish.
The Varnish backend then behaves erratically for some time until the instance stabilizes.
What I would like to have? a hook to run a command before the instance is restarted and after is marked as running.
Then I would be able to configure something like this:
memmon detects high memory usage
pre-hook is run: varnishadm backend.set_health instance1 sick
instance1 is restarted
supervisor waits and marks it as running
post-hook is run: varnishadm backend.set_health instance1 auto
This could be useful in other use cases also.
The text was updated successfully, but these errors were encountered:
If this was available, we could also use it with a strategy similar to that used in the Plone Ansible Toolkit's client restart mechanism. It removes a zeo client from the cluster prior to the restart, then loads selected pages via the client before restoring it to the cluster.
According with Supervisor/supervisor#31 this can be achieved "executing a script that registers a signal handler for TERM, spawns a subprocess, then waits forever, and calls the save command then kills the subprocess when it gets a TERM."
We have the following typical use case: Plone site with multiple instances running behind a web accelerator like Varnish, using memmon and httpok.
From time to time, memmon will need to restart an instance because of high memory consumption; Varnish has configured backend health check probes that test if the instances are available or not, and this probes have to play very nicely with the instances because requests hitting the backend are typically slow; for instance:
As restarting a Plone instance is a time consuming process (typically, around 30 seconds), Varnish will not notice the instance is down for some time and will continue sending requests; the instance then came in and will be flooded with a lot of pending requests from Varnish.
The Varnish backend then behaves erratically for some time until the instance stabilizes.
What I would like to have? a hook to run a command before the instance is restarted and after is marked as running.
Then I would be able to configure something like this:
varnishadm backend.set_health instance1 sick
varnishadm backend.set_health instance1 auto
This could be useful in other use cases also.
The text was updated successfully, but these errors were encountered: