• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Decreasing memory footprint on Ubuntu.

M

MartijnL

Guest
I'm having memory issues with Plesk 9.5.4 in a Virtuozzo container (can't find version) on Ubuntu (Linux 2.6.18-028stab070.14).

It's a small virtual server with 256MB soft limit on memory and 512 hard limit.
The server is hosting 5 sites (4 CMSMS based, 1 Wordpress based) with low traffic.
Wordpress requires >32MB memory in php.ini in order to run the backend, so I've set it to memory_limit=40M.
By default, Plesk is configured to run upto 10 instances of Apache (from maxclients setting in /etc/apache2/apache2.conf) and with each eventually using some 40MB, I'm quickly running out of memory.

The simplest solution seems to be to just limit the number of instances to 4 or 5; traffic is low enough on these sites that 4 is probably still more than it needs, but after a few hours of googling, I still haven't figured out how to change it. Plenty of ideas on how to do it with centos, but /etc/httpd doesn't exist on Ubuntu, nor can I find an swtune.conf file.

Possibly there are other optimizations, like somehow configuring Apache to release memory after a certain period of inactivity or otherwise?

I'm thankful for any answer.
kind regards,
Martijn
 
Hi,

I'm confused, you can limit the number of processes using MaxClients and ServerLimit in the file you mentioned : /etc/apache2/apache2.conf

Its not ideal however as it may get overwritten by Plesk or apt-get at a later date, a better method would be to find the directory used to host the smaller apache configuration files (it's usually listed as an include at the bottom of /etc/apache2/apache2.conf and its probably /etc/apache2/conf.d) and paste in a copy of the prefork configuration from apache2.conf and make your changes there.

Also, if you're willing to make the effort I'd strongly recommend you work out how to get Nginx setup as a reverse proxy in front of Apache, that will most likely fix all your problems.

Paul.
 
I've found the solution, thanks to your tip of looking for a suitable include in /etc/apache2/apache2.conf.

According to the apache2.conf file, a /etc/apache2/httpd.conf file may optionally be included explicitely for "all the user configurations".

I've set up my server to preserve a little bit more memory by following http://onlamp.com/pub/a/onlamp/2004/02/05/lamp_tuning.html and a little common sense thinking.
After /usr/local/psa/admin/sbin/websrvmng --reconfigure-all, everything seems to respond as I configured it.

Wordpress' admin backend still seems to be a huge memory hog, but atleast memory usage is more under control now.
 
Back
Top