{"id":7260,"date":"2014-06-03T23:26:18","date_gmt":"2014-06-03T23:26:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/03\/unexpected-server-reset-with-php-and-apache-collection-of-common-programming-errors\/"},"modified":"2014-06-03T23:26:18","modified_gmt":"2014-06-03T23:26:18","slug":"unexpected-server-reset-with-php-and-apache-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/03\/unexpected-server-reset-with-php-and-apache-collection-of-common-programming-errors\/","title":{"rendered":"Unexpected server reset with php and apache-Collection of common programming errors"},"content":{"rendered":"<p>I have an application which interacts with a database. Suddenly and occasionally, pages are showing me <code>Server connection Reset<\/code> error in my Web browser. More surpisingly, accessing on a <code>localhost<\/code> page is triggering an alert on avast.<\/p>\n<p>If I refresh pages using <code>Ctrl+R<\/code>, it happens occasionally. PHP is not showing any error messages, and it seems like the server is taking more time to respond than usual.<\/p>\n<p>I am using wamp with apache 2.4, PHP 5.4.3. I am clueless as to where to start debugging or where to the problem is.<\/p>\n<pre><code>[Sun May 13 13:01:14 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]\n[Sun May 13 13:01:14 2012] [notice] Apache\/2.2.22 (Win32) mod_ssl\/2.2.22 OpenSSL\/0.9.8x configured -- resuming normal operations\n[Sun May 13 13:01:14 2012] [notice] Server built: May 13 2012 12:51:11\n[Sun May 13 13:01:14 2012] [notice] Parent: Created child process 3660\nApache server interrupted...\narn] Init: Session Cache is not configured [hint: SSLSessionCache]\n[Sun May 13 13:01:15 2012] [notice] Child 3660: Child process is running\n[Sun May 13 13:01:15 2012] [notice] Child 3660: Acquired the start mutex.\n[Sun May 13 13:01:15 2012] [notice] Child 3660: Starting 64 worker threads.\n[Sun May 13 13:01:15 2012] [notice] Child 3660: Starting thread to listen on port 80.\n[Sun May 13 13:01:15 2012] [notice] Child 3660: Starting thread to listen on port 80.\n[Sun May 13 13:01:28 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.\n[Sun May 13 13:01:28 2012] [notice] Child 3660: Exit event signaled. Child process is ending.\n[Sun May 13 13:01:29 2012] [notice] Child 3660: Released the start mutex\n[Sun May 13 13:01:30 2012] [notice] Child 3660: All worker threads have exited.\n[Sun May 13 13:01:30 2012] [notice] Child 3660: Child process is exiting\n[Sun May 13 13:01:30 2012] [notice] Parent: Child process exited successfully.\n<\/code><\/pre>\n<p><strong>UPDATE:<\/strong><\/p>\n<p>When &#8216;connection request&#8217; occurs if is use <code>cachegrind<\/code> it shows partial list of callstack of methods. means it does not run all the code. it is showing some require_once calls and that it. next time if i retry to get the page, page executes and shows the whole callstack.<\/p>\n<p>When &#8216;connection request occurs&#8217; it shows<\/p>\n<pre><code>18 different functions called in milliseconds (1 runs, 18 shown)\n<\/code><\/pre>\n<p>after retrying<\/p>\n<pre><code>220 different functions called in 329 milliseconds (2 runs, 220 shown)\n<\/code><\/pre>\n<p>I dont know why it is showing 2 runs. also it is taking more time to execute page. before it was doing it less than 100 ms.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have an application which interacts with a database. Suddenly and occasionally, pages are showing me Server connection Reset error in my Web browser. More surpisingly, accessing on a localhost page is triggering an alert on avast. If I refresh pages using Ctrl+R, it happens occasionally. PHP is not showing any error messages, and it [&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-7260","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7260","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=7260"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7260\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}