0

I have Wordpress running in Production behind Load Balancer. The number of request is around 4 req/sec on each server as captured through apachetop. The system runs and intermittently throws "Out of memory error killing apache" and becomes unresponsive.

The configuration of server as mentioned below:

3 CentOS 6.5 machines with 4 cores and 4 GB Physical Memory. Wordpress running Apache with mod_php in prefork mpm. MySQL database is running on different machine. Below are the statistics of few commands generated:

top top output

vmstat vmstat output

Need to figure out what exactly is causing the issue, and what needs to be fixed. Also like to know about performing the profiling of CPU, Memory etc. If any further information required, please let me know.

2

It can take a while to tweak your Apache config to suit your needs. Best to start with only enabling what you need.

Then move to tweaking the values for:

  • StartServers
  • MinSpareServers
  • MaxSpareServers
  • ServerLimit
  • MaxClients
  • MaxRequestsPerChild
  • Timeout
  • MaxKeepAliveRequests
  • KeepAliveTimeout

Logging is another option to switch off. If you don't need it, switch it off.

It is completely pointless for me to share my values as my needs are more then likely very different from yours.

  • Sorry apache is not running in Prefork, it is running with Worker mpm. Please let me know what values to be tweaked for making it to work correctly. We have tweaked the values as: KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15 <IfModule worker.c> StartServers 5 MaxClients 2000 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 50 MaxRequestsPerChild 100 ServerLimit 64 </IfModule> – yravi104 Oct 11 '17 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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