Re: Apache don't start Cannot allocate memory [message #12858 is a reply to message #12855] |
Sat, 12 May 2007 04:17 |
swindmill
Messages: 57 Registered: April 2007
|
Member |
|
|
The default Debian Apache2 install uses the worker MPM which seems to eat up memory at initialization.
I edited my /etc/apache2/apache2.conf to look like this:
...
<IfModule mpm_worker_module>
#Default is 2
StartServers 1
#Default is 150
MaxClients 80
#Default is 25
MinSpareThreads 5
MaxSpareThreads 75
#Default is 25
ThreadsPerChild 5
MaxRequestsPerChild 0
</IfModule>
...
And apache2 starts up properly on a VE and uses MUCH less memory.
You can also install libapache2-mod-php5 and Debian will switch Apache2 to use the prefork MPM which needs less memory.
apt-get install lib-apache2-mod-php5
You can check which MPM apache2 is set to use by running /usr/sbin/apache2 -l
You'll see either prefork.c or worker.c? (I'm not currently using worker) in the output.
|
|
|