{"id":6789,"date":"2014-04-23T08:06:03","date_gmt":"2014-04-23T08:06:03","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/what-are-the-logs-to-check-for-a-hung-lamp-server-collection-of-common-programming-errors\/"},"modified":"2014-04-23T08:06:03","modified_gmt":"2014-04-23T08:06:03","slug":"what-are-the-logs-to-check-for-a-hung-lamp-server-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/what-are-the-logs-to-check-for-a-hung-lamp-server-collection-of-common-programming-errors\/","title":{"rendered":"What are the logs to check for a hung LAMP server?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m running Centos 5.7. I&#8217;m running Apache, MySQL, PHP, Courier-IMAP, Qmail and Plesk control panel in a typical Web hosting server setup. It gets hung often.<\/p>\n<p>I had to restart the server via the admin panel, since there was no Plesk or SSH access&#8230; How to prevent this from happening again?<\/p>\n<blockquote>\n<p>Processor: AMD Phenom(tm) II X4<br \/>\nRAM: 8 GB<\/p>\n<\/blockquote>\n<p>I noticed some errors in the Apache log:<\/p>\n<pre><code># tail -20 \/var\/log\/httpd\/error_log\n\n[Mon Sep 03 06:12:33 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/web\n[Mon Sep 03 06:12:34 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/php-my-admin\n[Mon Sep 03 06:12:34 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/websql\n[Mon Sep 03 06:12:35 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpmyadmin\n[Mon Sep 03 06:12:36 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin\n[Mon Sep 03 06:12:36 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2\n[Mon Sep 03 06:12:37 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/php-my-admin\n[Mon Sep 03 06:12:38 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.2.3\n[Mon Sep 03 06:12:38 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.2.6\n[Mon Sep 03 06:12:39 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.1\n[Mon Sep 03 06:12:39 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.4\n[Mon Sep 03 06:12:40 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.5-rc1\n[Mon Sep 03 06:12:41 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.5-rc2\n[Mon Sep 03 06:12:41 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.5\n[Mon Sep 03 06:12:42 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.5-pl1\n[Mon Sep 03 06:12:43 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.6-rc1\n[Mon Sep 03 06:12:43 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.6-rc2\n[Mon Sep 03 06:12:44 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.6\n[Mon Sep 03 06:12:45 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.7\n[Mon Sep 03 06:12:45 2012] [error] [client 202.29.34.28] File does not exist: \/var\/www\/vhosts\/default\/htdocs\/phpMyAdmin-2.5.7-pl1\n<\/code><\/pre>\n<p>Also noticed some mysql slow queries:<\/p>\n<pre><code># Query_time: 23.734215  Lock_time: 0.000111 Rows_sent: 1  Rows_examined: 2501281\nuse yasooyam_yasoodb;\nSET timestamp=1346149823;\nSELECT COUNT(user_history_product.ID) FROM user_history_product WHERE user_history_product.PRODUCT_ID=915;\n\n# Query_time: 293.916966  Lock_time: 1.163037 Rows_sent: 1  Rows_examined: 2501280\nSET timestamp=1346149823;\nSELECT COUNT(user_history_product.ID) FROM user_history_product WHERE user_history_product.PRODUCT_ID=172;\n\n# Query_time: 61.295134  Lock_time: 0.000345 Rows_sent: 331  Rows_examined: 331\nuse pumexinf_mdb;\nSET timestamp=1346149825;\nshow tables;\n\n# Query_time: 16.869923  Lock_time: 2.281526 Rows_sent: 1889  Rows_examined: 9330\nuse yasooyam_yasoodb;\nSET timestamp=1346586973;\nSELECT user_items.ID, user_items.TYPE, user_items.USER_ID, user_items.SHOW_IN, user_items.CATEGORY, user_items.SUB_CATEGORY, user_items.COUNTRY, user_items.LANGUAGE, user_items.TITLE, user_items.START_TIME, user_items.END_TIME, user_items.DATE, user_items.DESCRIPTION, user_items.ATTACH, user_items.IMAGE, user_items.IMAGE_AUTHOR, user_items.IMAGE_SOURCE, user_items.VIDEO_URL, user_items.THUMB, user_items.AUTHOR, user_items.SOURCE, user_items.CREATE_DATE, user_items.UPDATE_DATE, user_items.STATUS FROM user_items WHERE user_items.TYPE=9 AND user_items.STATUS=1;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m running Centos 5.7. I&#8217;m running Apache, MySQL, PHP, Courier-IMAP, Qmail and Plesk control panel in a typical Web hosting server setup. It gets hung often. I had to restart the server via the admin panel, since there was no Plesk or SSH access&#8230; How to prevent this from happening again? Processor: AMD Phenom(tm) II [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6789","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6789"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6789\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}