title: How to debug intermittent Error 500 error in domlogs?
body: <p>I have a website running in my own dedicated server running CPANEL. 
  I have Apache/2.4.12 and PHP Version 5.4.41.</p>
  
  <p>Once in a while I see error 500 response in the log. But I couldn't seem to figure out where it's coming from. When I check the page... it is fine and throws 200 response code. When I try to fetch it in Google, it's also fine. But sometimes, Google Webmasters will report I got Error 500 in some of the pages.</p>
  
  <p>Anyone here have gone through properly debugging this? What might be triggering the error?</p>
  
  <p>Example from the log:</p>
  
  <pre><code>46.229.168.79 - - [16/Mar/2018:09:45:04 -0400] "GET /sports-nfl-larry-allen-weight HTTP/1.1" 500 6935 "-" "Mozilla/5.0 (compatible; SemrushBot/1.2~bl; +http://www.semrush.com/bot.html)"
  148.64.56.65 - - [16/Mar/2018:09:45:09 -0400] "GET /snap-meee HTTP/1.1" 500 6711 "-" "Mozilla/5.0 (compatible; GrapeshotCrawler/2.0; +http://www.grapeshot.co.uk/crawler.php)"
  23.96.208.137 - - [16/Mar/2018:11:30:05 -0400] "GET /rihanna-slams-snapchat HTTP/1.1" 500 7462 "-" "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)"
  72.30.14.91 - - [16/Mar/2018:11:30:07 -0400] "HEAD /kendall-jenner-explained-to-ellen-degeneres HTTP/1.1" 500 - "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
  </code></pre>
  
  <p>Just to add more info. I got APC caching and I use a CDN provider. But like I said, the page actually responds pretty quick with no error when I check it.</p>
  
  <p>EDIT: Something from error log.. but I don't see any log corresponding to the timestamp when Error 500's occur.</p>
  
  <pre><code>[Thu Mar 15 17:12:44.532038 2018] [core:error] [pid 26532] [client 194.0.200.11:52727] AH00135: Invalid method in request ------41184676334--
  [Thu Mar 15 17:13:01.113257 2018] [core:error] [pid 26538] [client 194.0.200.11:54514] AH00135: Invalid method in request ------41184676334--
  [Thu Mar 15 20:10:44.220358 2018] [core:notice] [pid 17916] AH00052: child pid 8905 exit signal Segmentation fault (11)
  [Fri Mar 16 05:35:21.280659 2018] [core:error] [pid 25310] [client 71.6.146.185:57523] AH00135: Invalid method in request quit
  [Fri Mar 16 08:25:10.126197 2018] [:error] [pid 6358] [client 66.249.69.147:43415] script '/home/****/public_html/index.php' not found or unable to stat
  [Fri Mar 16 12:25:22.897389 2018] [mpm_prefork:notice] [pid 17916] AH00173: SIGHUP received.  Attempting to restart
  [Fri Mar 16 12:25:22.950624 2018] [mpm_prefork:warn] [pid 17916] AH00181: MaxRequestWorkers of 400 exceeds ServerLimit value of 256, decreasing to match
  [Fri Mar 16 12:25:23.001101 2018] [ssl:warn] [pid 17916] AH01909: proxy-subdomains-ssl-default-vhost.localhost:443:0 server certificate does NOT include an ID which matches the server name
  [Fri Mar 16 12:25:23.138917 2018] [mpm_prefork:notice] [pid 17916] AH00163: Apache/2.4.12 (Unix) OpenSSL/1.0.1e-fips PHP/5.4.41 configured -- resuming normal operations
  [Fri Mar 16 12:25:23.138948 2018] [core:notice] [pid 17916] AH00094: Command line: '/usr/local/apache/bin/httpd'
  </code></pre>
  
  <p>I'm currently fixing the MaxRequestWorkers warning which I think has nothing to do with the Error 500.</p>