Httpd memory usage

Hey all,

I have seen this topic many a time in the archives no one really has
solved it. Firstly here are my specs:

RH8
Mod-perl1.29
Apache 1.3.29
Mysql-3.23
RT-3-0-8

Everytime I start up apache memory gets used (22mb per connection) up
within a couple of hours and slows RT right down. I have 512mb of RAM.
Also allot of empty files seem to appear in my /tmp folder. Has anyone
else had this problem? Even better has anyone else solved this problem?

Regards,
Kevin

Kevin,

Everytime I start up apache memory gets used (22mb per connection) up
within a couple of hours and slows RT right down. I have 512mb of RAM.

I’m using a completely different platform but noticed apache processes were
getting very large, this was over a period of a week.
I worked around it using MaxRequestsPerChild in apache’s config so processes
would be killed off before they got too big. Combining that with
MaxSpareServers, to keep the number of unused processes low, fixed the
problem.
This hasn’t affected perfomance, apache spawns extra processes as required
without delay.
Without this apache started using so much memory that mysql was affected and
performance would nose dive.

Also allot of empty files seem to appear in my /tmp folder. Has anyone
else had this problem? Even better has anyone else solved this problem?

I think these are temporary files used to stash attachments by
RT::EmailParser, it’s using File::Temp with it’s automatic cleanup but it’s
not working properly. I’ve not investigated it beyond that, just use a cron
job to tidy up by running this every hour:

find /tmp -user nobody -group nobody
-name ‘???’
-mmin +60 -exec rm -r {} ; 2>/dev/null

Note, you need gnu find for the “mmin” switch.

Max Norton
University of Bath Computing Services

find /tmp -user nobody -group nobody
-name ‘???’
-mmin +60 -exec rm -r {} ; 2>/dev/null

Note, you need gnu find for the “mmin” switch.

No, you don’t need GNU find. NetBSD’s and FreeBSD’s find
commands support “-mmin”, and there might be others too.

–apb (Alan Barrett)