• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Apache memory leak / usage problem

Having the same issue

I installed plesk 10 and since then apache's memory goes full. I created a cron to restar httpd service at 2am. Hello parallels?!
 
I had to take drastic measures in the end—I moved hosting providers to Media Temple who are a Plesk "shop". Their implementation of CentOS/Plesk 10 is stable—and with *exactly* the same configuration Apache memory use never goes above 11% of total memory.
 
I'd also recommend checking out mod_top for investigating what apache is doing while its running, and mod_whatkilledus for crash debugging.
 
I'm using centos 5.5 x64 with plesk 10 and apache2 and mod_top is not compatible, any other solution to know what apache is doing? Thanks
 
similar issue on our end.

Have same problem:

apache 1415 0.3 3.5 390188 56160 ? S Feb07 2:25 /usr/sbin/httpd
apache 1725 0.3 2.3 370956 36616 ? S Feb07 2:35 /usr/sbin/httpd
apache 1727 0.3 2.3 371056 36820 ? S Feb07 2:43 /usr/sbin/httpd
apache 1728 0.3 2.3 371592 37224 ? S Feb07 2:41 /usr/sbin/httpd
apache 1729 0.3 2.3 370936 36652 ? S Feb07 2:42 /usr/sbin/httpd
apache 1730 0.3 2.3 371568 37172 ? S Feb07 2:17 /usr/sbin/httpd
apache 1911 0.3 2.3 371252 36936 ? S Feb07 2:27 /usr/sbin/httpd
apache 1916 0.3 2.3 371980 37672 ? S Feb07 2:25 /usr/sbin/httpd
apache 2492 0.3 3.5 390092 56076 ? S Feb07 2:10 /usr/sbin/httpd
apache 6080 0.2 3.5 389964 55924 ? S Feb07 1:28 /usr/sbin/httpd
root 14591 0.0 0.0 61172 780 pts/0 S+ 08:44 0:00 grep httpd
root 27086 0.0 1.0 291272 16016 ? Ss Feb07 0:01 /usr/sbin/httpd
apache 27088 0.0 0.3 229472 5448 ? S Feb07 0:00 /usr/sbin/httpd
apache 27089 0.4 3.5 390324 56404 ? S Feb07 3:46 /usr/sbin/httpd
apache 27091 0.4 3.6 390744 57004 ? S Feb07 3:40 /usr/sbin/httpd
apache 27092 0.4 2.4 372424 38176 ? S Feb07 3:48 /usr/sbin/httpd
apache 27093 0.4 3.5 390276 56324 ? S Feb07 3:30 /usr/sbin/httpd
apache 27094 0.4 2.4 372428 38196 ? S Feb07 3:42 /usr/sbin/httpd
apache 27095 0.4 3.5 390304 56392 ? S Feb07 3:28 /usr/sbin/httpd
apache 27238 0.4 3.6 390732 56904 ? S Feb07 3:41 /usr/sbin/httpd
apache 27384 0.4 2.3 371196 36968 ? S Feb07 3:23 /usr/sbin/httpd
apache 28335 0.4 2.3 371816 37384 ? S Feb07 3:37 /usr/sbin/httpd
apache 28469 0.3 2.4 372692 38488 ? S Feb07 3:10 /usr/sbin/httpd

And CPU goes 100% with sw-collectd and need to stop it

I'm only hosting 2 webs!

KeepAlive is set to Off and Persistent Connections with Mysql too.
 
This problem seems to be related only with plesk > 10
I usually manage several server with lower Plesk versions that works fine, but I've noticed that on a new (and clean) setup with Plesk 10.1 recently updated to 10.2 the server load is very high when the daemon sw-collectd is running.
I have tried with:

service sw-collectd restart

the server load decreases immediately and goes under 0.2

I fear there is a cron dayly job or something like this that starts a sw-collectd process, because almost everyday at the same hour the server load increases and the daemon must be restarted to keep the load low.

I'm looking for a fix...
 
PSA 10.2, CentOS 5.5 64-Bit, AMD 1&1 Machine

I had problems like this with 9.5.4 and 10.1 -- I set all of my domains to run PHP as Apache. I found that running sites through mod-fcgi caused ridiculous loads.

I would love to run sites in mod-fcgi, especially for the permissions. I spoke with AtomicTurtle about this and he pointed me towards his distro of 'ruid2', which provides another way to get around the apache permissions, which is highly useful for me with hosting Wordpress websites.

I am hoping that this might help.
 
Hi,

i have the same problem the Apache now uses almost 50% RAM / 4GB System.
Is there a fix?

thanks,
 
Fix for me

I had the php as apache module and changed it to fast cgi and cgi
and now the memory is down to a normal level here is the mem usage.
but now i have another problem that the php scripts dont have the right permissions
i will update if i have a fix

 
All,

I am experiencing exactly the same issue since the move to 10.3.1.

As another user posted in this thread, I am only hosting two sites on my server and find it difficult to believe that Apache is using around 400 MB / 500 MB.

Also, my 'KeepAlive' setting is configured to Off along with Persistent Connections within MySQL.

Does anybody have any input as to what is causing this issue ?

My Apache configuration is 'out of the box' and I haven't added any additional modules or altered any Apache settings other than those mentioned.

Hopefully somebody will be able to help.

Many thanks in advance.

Darran
 
same..

Same problem here with plesk 10.1.1 ...thought about updating to 10.3, but since ppl here still have this issue I highly doubt that this has been fixed yet.

No response from parallels so far, so they probably don't have any clue what's causing this.


When I run 'top' from the shell, MEM usage is nowhere near the health-report - the running processes hardly take 10%. So what the F is plesk reporting? I had the same issue with CPU reports from health-monitor which I got fixed (hopefully). plesk reported about very high CPU usage of apache, 'top' displayed an entirely different situation. I'm about to delete health-monitor since no reports are way better for me than false information. my boss is going nuts, always thinking the server is crashing and calling on me because of that ****.

Please parallels, tell us how to fix this or just admit that health-monitor is buggy. I see another weekend getting ruined because of these reports...
 
not really a fix, but...

Using this guide probably won't fix the entire problem, but at least adds some more stability.
http://rimuhosting.com/howto/memory.jsp

Until now I didn't notice any changes concerning the performance, so ppl having these issues should consider decreasing their values for the following parameters in httpd.conf:
StartServers, MinSpareServers, MaxSpareServers, MaxRequestsPerChild

Having MaxRequestsPerChild set to zero is a potential reason for the memory leak, but I'm not entirely sure right now. All I know so far is that the server is running way better since settings have been changed... I'll update this post once I'm sure it's really not crashing anymore.

UPDATE: so this won't fix anything, it's just delaying the crash. gonna add a cron now to restart httpd every 5 hours... this should work. not the most elegant solution, but with not a single response from parallels I don't want to waste any more time investigating this issue :(
 
Last edited by a moderator:
I have exactly the same problem with a plesk 10.1 system that was running fine until I "upgraded" to 10.3.1 and now Apache is consuming more memory than I have every seen a comparable server take in more than 15 years of administering Linux servers.

Igor, why are you not replying to this thread?
 
Until now I didn't notice any changes concerning the performance, so ppl having these issues should consider decreasing their values for the following parameters in httpd.conf:
StartServers, MinSpareServers, MaxSpareServers, MaxRequestsPerChild

Having MaxRequestsPerChild set to zero is a potential reason for the memory leak, but I'm not entirely sure right now. All I know so far is that the server is running way better since settings have been changed... I'll update this post once I'm sure it's really not crashing anymore.

Set your MinSpareServers and MaxSpareServers to 1, and set your MaxRequestsPerChild to something lower than it is, we run on either 1000 or 2000 but thats because we're serving Magento pages and they're memory hungry. I'd also ensure that your MaxClients is set to something sane, either use the rimuhosting script that MartinV linked to or work it out manually.

The (minimal) overhead of spawning processes is far better than going into swap.

I'd say its definitely the case that something is causing this but I'm not entirely sure its Plesk, more likely its a recent update to Apache, I had this exact issue on a newly provisioned server yesterday when I'd left the MaxSpares at 5, which is normally absolutely fine.

And from what little I've seen of the health-monitory, it is pretty **** ;)

Paul.
 
still an issue with Plesk 11.x

does anyone know if this issue has been cleaned up in plesk 11? I thought I'd found the culprit for this problem in one of my domains running old web scripts, but it still seems an issue even now that's cleared up.

I notice there is a new plesk 11 version to upgrade to but didn't see mention of this bug in the fixes....
 
looks promising, am i right in thinking Nginx is part of the plesk 11 package - I don't need to do anything other than upgrade to 11....
 
Back
Top