This is a discussion on Re: Mod_Perl and MaxRequestsPerChild - modperl ; Hi Mark I don't know what the issue is, but do you really need to use threads? Why not just use the prefork MPM? It is more efficient than the worker MPM on linux, and may ("may" being a complete ...
I don't know what the issue is, but do you really need to use threads?
Why not just use the prefork MPM? It is more efficient than the worker
MPM on linux, and may ("may" being a complete guess) be the source of
Unless you have a really good reason to use worker, on linux, the
recommended MPM is worker. And it may just be the source of your
> I have a high traffic mod_perl2 web server (40 requests/second and all
> are dynamic data - no images or static html) and I have a slow memory
> leak in mod_perl2. I haven't tracked the leak down yet, but to deal
> with it I have set MaxRequestsPerChild to 5000. I'm using the worker
> MPM with the following config:
> ServerLimit 5
> MaxClients 250
> StartServers 5
> MinSpareThreads 250
> MaxSpareThreads 250
> ThreadsPerChild 50
> Since I set MaxRequestsPerChild to 5000 I noticed that the number of
> httpd.worker processes at some point doubles from 5 to 10. It's as if
> the old processes aren't being shut down properly once they've served
> their 5000 requests.
> I have mod_status installed and it still only shows me 5 processes
> with their respective threads even though 10 appear to be running.
> ps shows the 10 processes and that only half of them have their CPU
> time increasing - the others don't seem to be doing any work. Also, it
> seems that the half that are working are fairly new processes and are
> being killed and re-spawned in accordance with MaxRequestsPerChild
> and the others are just sitting there.
> I'm running Fedora Core 6 64bit with the standard RPM distribution of
> mod_perl and Apache/2.2.4.
> The binary httpd.worker has the following statically compiled in:
> I have the following DSO modules in my config:
> LoadModule log_config_module modules/mod_log_config.so
> LoadModule expires_module modules/mod_expires.so
> LoadModule deflate_module modules/mod_deflate.so
> LoadModule mime_module modules/mod_mime.so
> LoadModule status_module modules/mod_status.so
> LoadModule alias_module modules/mod_alias.so
> LoadModule rewrite_module modules/mod_rewrite.so
> LoadModule authn_file_module modules/mod_authn_file.so
> LoadModule auth_basic_module modules/mod_auth_basic.so
> LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
> LoadModule authn_default_module modules/mod_authn_default.so
> LoadModule authz_host_module modules/mod_authz_host.so
> LoadModule authz_user_module modules/mod_authz_user.so
> LoadModule authz_default_module modules/mod_authz_default.so
> LoadModule perl_module modules/mod_perl.so
> LoadModule apreq_module modules/mod_apreq2.so
> Any help or suggestions would be much appreciated.