I have a WP site which creates 500's errors for about 2% of Apache requests (mostly bots and crawlers). I'm not able to stack trace most of those requests with 500's neither to PHP or MySQL errors as well Apache error logs.

Apache access log example for crawlers: - - [06/Oct/2015:11:23:49 -0400] "GET /international-chamber-of-commerce-icc-ud-754/ HTTP/1.1" 500 - "http://www.bing.com" "Mozilla/5.0 (Windows NT 6.2; rv:42.0) Gecko/20100101 Firefox/42.0" - - [06/Oct/2015:11:29:05 -0400] "GET / HTTP/1.1" 500 - "-" "webmon-webagent v1.3" - - [06/Oct/2015:11:39:23 -0400] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Anturis Agent)"

Is it good idea to disable a garbage collection (gc_disable()) for the whole WP site to prevent any memory leak caused by a theme or plugins?

closed as off-topic by vancoder, TheDeadMedic, Pieter Goosen, Howdy_McGee, Robert hue Oct 15 '15 at 3:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – TheDeadMedic, Pieter Goosen, Howdy_McGee, Robert hue
If this question can be reworded to fit the rules in the help center, please edit the question.


Disabling garbage collection only means that what ever memory is being leaked will reamain leaked and there will be no effort to reclaim it.

To fix 500 problems you need to check the actual errors reported at the php error log.

  • The problem is that there are no corresponding errors for that 500's error timestamp (or even close to it) at the PHP error log or MySQL error log. It looks like a crawler or bot is visiting a site/page, getting 500 but there is no time out or any other error at the PHP error log neither connection or query issues at the MySQL error log. – JackTheKnife Oct 6 '15 at 13:12
  • then the 500 is most likely a problem at the webserver. have you tried to check error log at that level? – Mark Kaplun Oct 6 '15 at 13:48
  • You mean Apache access.log? – JackTheKnife Oct 6 '15 at 15:10
  • yes, but its error logs – Mark Kaplun Oct 6 '15 at 15:15
  • 1
    then I would assume it is a plugin that does it, but anyway this get to out of the original scope of the question and server errors type of question are off-topic since it is hard to do more then guessing without access to the server – Mark Kaplun Oct 6 '15 at 17:11

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