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
Comments