1

My new drupal site crashes very often because the apache server goes up to 100% cpu usage. I have to ask our hardware guy to restart it once everyday.

Also, He asked me if I am sure that the site does not have memory leak. As the logs are stating that PHP can't get any more memory. What might actually happened and how can I debug/detect the memory leak bugs?

5
  • 2
    How much memory does the server allocate to PHP? You can find it in php.ini, also do you use memcache or APC or Varnish or Boost or at least is Drupal caching turned on?
    – Beebee
    Commented Oct 15, 2013 at 9:43
  • Up to 100% of what? And what modules you are using? Memory leaks are not so easy with PHP - script shuts down after few seconds and all it's memory should be released - it's not C or anything. On the other hand using a lot of memory may happen - but what is your site doing and how much is much?.. How much you are allowed to use?
    – Mołot
    Commented Oct 15, 2013 at 9:49
  • 'memory_limit=128M' in php.ini, does the drupal caching not turn on by default? How do I turn it on? Commented Oct 15, 2013 at 10:06
  • Have you seen Why is Drupal 7 so slow? and tried suggestions posted there?
    – Mołot
    Commented Oct 15, 2013 at 10:18
  • 1
    Drupal cache is usually off by default. You can switch it on in Configuration -> Development -> Performance. 128MB should usually be enough, but it depends on each installation, what the site does etc. Is there a lot of image processing on the site? Processing large images requires a lot of memory, depends on the image dimensions. You can try increasing the PHP memory to 256MB and see if that helps, but ultimately you should look into using APC or Memcached. Also check this page: drupal.org/requirements/php
    – Beebee
    Commented Oct 15, 2013 at 10:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.