[mod_python] memory consumption increase on httpd reload

aman aggarwal amanagg at gmail.com
Thu Sep 11 08:53:10 UTC 2014


Hi Nathan/Grisha,

By "reload", we mean the following command is executed " /etc/init.d/httpd
reload". We observed that this command is executed every time Linux
"logrotate" utility is invoked. As per our project, we have entries in
crontab wherein the logs are rotated every 2 minutes. Hence, we have
confirmed by 'top' output that memory consumption of httpd process
increases every time this reload command is executed.

Also, when we manually invoke this command, the memory consumption
increases.

Now, regarding usage of mod_python, my complete application is in
mod_python and cannot be removed. For mod_python, we have include
"python.conf" in httpd.conf file.

In python.conf file, we have included mod_python module.

I am attaching both the files for reference.

Thanks and regards,
Aman Aggarwal

On Thu, Sep 11, 2014 at 5:33 AM, Nathan Adams <adamsna at datanethost.net>
wrote:

>  Aman,
>
> Many years ago when we were using mod_python we noticed a similar issue.
> At the time our solution was to move to mod_wsgi. However, now that Grisha
> is maintaining the project again you might want to compile from source
> because the maintainers may have assumed that mod_python was permanently
> gone. It's actually very easy on CentOS as all the prereqs can be
> downloaded using yum.
>
> If you do this and mod_python is still an issue then sending over some
> sample code to reproduce the problem might help. I have also heard of some
> issues if you have both mod_python and mod_wsgi in the same Apache instance
> (
> https://code.google.com/p/modwsgi/wiki/InstallationIssues#Using_ModPython_and_ModWsgi
> ). If you are curious you could check out similar products like mod_wsgi
> (wouldn't recommend as it's configuration is non-intuitive and it's author
> can be quite intimidating), uWSGI, or even gunicorn and see if your memory
> increase problem exists with those products. I've personally only had to
> interact with mod_wsgi and while the product itself isn't buggy and works
> great the configuration can be a pain and it doesn't help that the
> documentation is lacking.
>
>
>
> On 9/10/2014 10:17 AM, Grisha Trubetskoy wrote:
>
>
>  Aman
>
>  It's hard to say what might be the cause of that without more detail on
> how mod_python is configured and exactly what you mean by "reload". It also
> might be that CentOS 5.4 and 6.4 have an outdated version of mod_python and
> this bug may be fixed already.
>
>  How much of a memory increase are you observing, and is that really a
> problem? Also, are you actually using mod_python, if not, may be the fix is
> as simple as to remove it from the configuration?
>
>  Regards,
>
>  Grisha
>
> On Wed, Sep 10, 2014 at 11:09 AM, aman aggarwal <amanagg at gmail.com> wrote:
>
>> Hi,
>>
>>  We have observed an issue wherein httpd process memory consumption is
>> increased when ever the httpd process is "reload". We have boiled the issue
>> that it is due to only with inclusion of mod_python package.
>>
>>  This is observed on both Centos 5.4 and Centos 6.4 versions. Please
>> provide the inputs.
>>
>>  regards,
>> Aman Aggarwal
>>
>> _______________________________________________
>> mod_python mailing list
>> mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>>
>
>
> _______________________________________________
> mod_python mailing listmod_python at modpython.orghttp://mailman.modpython.org/mailman/listinfo/mod_python
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.modpython.org/pipermail/mod_python/attachments/20140911/68073167/attachment-0001.html>


More information about the mod_python mailing list