You get a bonus - 1 coin for daily activity. Now you have 1 coin

Apache: error "out of memory: kill process"

Practice



The error "Apache: Out of memory: kill process A (apache2) score B or a child" means that Apache ran out of memory for the next client. As a rule, this happens on servers with little memory and heavy sites (for example, Bitrix eats memory endlessly, so a server with 256MB of memory is only good for it as a "well, if absolutely necessary" option). This is often the case with virtual machines that have limited memory.

The problem is solved in obvious ways:

a) Add more memory to the machine

b) Increase the swap partition (and even better, create it at a decent size from the start)

c) Reduce the number of simultaneous connections in the Apache config:

MaxClients 150

change and set a smaller value instead of 150.

d) Check the MySQL server config. For example, MySQL with Max_Connections = 100 and not heavily trimmed caches can easily eat up 300-500MB of RAM under load.

e) Take a look at other services running on this server, with the goal of moving them to other machines, so they don't eat up memory that's already scarce for Apache.Applies to: Apache 2.x
created: 2017-05-09
updated: 2026-03-10
957



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)