Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm unable to start apache2 due to memory issue.

service apache2 start

Action 'start' failed.
The Apache error log may have more information. 
failed!

tail -n 100 /var/log/apache2/error.log

fork: Cannot allocate memory
unable to fork new process

This is the output of my apache2.conf file

<IfModule mpm_prefork_module>
    StartServers        150
    MinSpareServers      10
    MaxSpareServers     150
    MaxClients          150
    MaxRequestsPerChild   2000
</IfModule>

Any ideas? :)

Cheers

share|improve this question

1 Answer 1

How much RAM do you have on your server?

It seems that your 'StartServers' variable is set too high.

StartServers – this is how many Apache instances should start when Apache is started on your server.

Set it to a lower value, for example 10 or so, and your should be able to start the Apache service.

share|improve this answer
    
Also, if this is it, I would strongly suggest lowering MaxSpareServers and possibly MaxClients as well. –  Michael Kjörling Jun 3 at 12:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.