This question about Not sure...: Asked

Memory leak in combination with Starman

There seems to be a serious memory leak when running Foswiki on starman. After some time (~1day) of operation this message appears to the user

Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.

Can't fork: Cannot allocate memory

and the process table looks like
app      21927  0.0  0.9  15648 10092 ?        Ss   Mar27   0:03 starman master /srv/web/propaganda.pm/srv/www/foswiki.psgi --workers 5 --pid /var/run/fos
app      21928  0.6 16.1 172400 166932 ?       S    Mar27   6:00 starman worker /srv/web/propaganda.pm/srv/www/foswiki.psgi --workers 5 --pid /var/run/fos
app      21929  0.5 12.9 138356 133772 ?       S    Mar27   4:51 starman worker /srv/web/propaganda.pm/srv/www/foswiki.psgi --workers 5 --pid /var/run/fos
app      21930  0.4 11.2 121232 116628 ?       S    Mar27   4:04 starman worker /srv/web/propaganda.pm/srv/www/foswiki.psgi --workers 5 --pid /var/run/fos
app      21931  0.5 13.3 142700 138012 ?       S    Mar27   4:48 starman worker /srv/web/propaganda.pm/srv/www/foswiki.psgi --workers 5 --pid /var/run/fos
app      21932  0.6 14.8 159824 153376 ?       S    Mar27   5:31 starman worker /srv/web/propaganda.pm/srv/www/foswiki.psgi --workers 5 --pid /var/run/fos

A simple restart helps, but a more sustainable solution would be welcome.

-- RichardJelinek - 28 Mar 2013

Using FastCGIEngineContrib, the fcgi backends restart themselves every 1000 calls (configurable).

-- MichaelDaum - 28 Mar 2013

You could use the https://metacpan.org/pod/Plack::Middleware::SizeLimit for the automatic worker restarts, until the leak will be closed. Works nicely, just determine the right memory size. (Use the log_when_limits_exceeded => 1 parameter to see, when the harakiri is executed).

-- JozefMojzis - 08 Dec 2015
 

QuestionForm edit

Subject Not sure...
Extension
Version Foswiki 1.1.8
Status Asked
Related Topics
Topic revision: r3 - 08 Dec 2015, JozefMojzis
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy