[Setup] best practices for restarting instances

Christian Ledermann christian.ledermann at gmail.com
Fri Apr 13 05:47:58 UTC 2012


I use supervisor + memmon + httpok

in the supervisord.conf it looks like:

[program:plone_sites1_client1]
command=/home/user/webapps/plone_sites1/zeocluster/bin/client1 console
priority=104

[eventlistener:memmon_sites1]
command=memmon -p plone_sites1_client1=1GB
events=TICK_60

and httpok to check if the instance is responding:

[eventlistener:httpok_sites1]
command=httpok -p plone_sites1_client1 http://localhost:8080/
events=TICK_60



On Thu, Apr 12, 2012 at 8:17 PM, Héctor Velarde
<hector.velarde at gmail.com> wrote:
> thanks, Servilio! looks pretty interesting... we will try to implement and
> document it for Mikko's sake ;-)
>
> Héctor Velarde
>
> On 12/04/12 11:52, Servilio Afre Puentes wrote:
>>
>> On Thu, 12 Apr 2012 10:22:39 -0500, Héctor
>> Velarde<hector.velarde at gmail.com>  wrote:
>>
>>> we are using Plone 4.1 with Relstorage; we have 4 instances running on a
>>> virtual machine and we want to restart them every time the server runs
>>> out of memory.
>>
>>
>> I am sure of having seen a package that hooked into Zope for this, but
>> can't find it now.
>>
>>
>>> I know Monit can do this (http://mmonit.com/monit/).
>>>
>>> what is the Plone community using for managing services and processes
>>> under *nix?
>>
>>
>> I have used supervisor with the memory monitor configured through
>> collective.recipe.supervisor[1] to automatically restart an instance
>> once it consumed more than a preset ammount of memory.
>>
>> Servilio
>>
>> Footnotes:
>>
>> [1] http://pypi.python.org/pypi/collective.recipe.supervisor#example-usage
>
>
>
> _______________________________________________
> Setup mailing list
> Setup at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-setup
>



-- 
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>


More information about the Setup mailing list