Parent: Received shutdown signal -- Shutting down the server - php

Using wampserver and receiving this error:
Parent: Received shutdown signal -- Shutting down the server.
Google doesn't seem to have any solutions that work. Any ideas?
[Mon Jul 25 19:07:02 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Jul 25 19:07:02 2011] [notice] Child 5828: Child process is running
[Mon Jul 25 19:07:02 2011] [notice] Child 5828: Acquired the start mutex.
[Mon Jul 25 19:07:02 2011] [notice] Child 5828: Starting 64 worker threads.
[Mon Jul 25 19:07:02 2011] [notice] Child 5828: Starting thread to listen on port 80.
[Mon Jul 25 19:07:40 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Jul 25 19:07:40 2011] [notice] Child 5828: Exit event signaled. Child process is ending.
[Mon Jul 25 19:07:41 2011] [notice] Child 5828: Released the start mutex
[Mon Jul 25 19:08:05 2011] [notice] Child 5828: All worker threads have exited.
[Mon Jul 25 19:08:05 2011] [notice] Child 5828: Child process is exiting
[Mon Jul 25 19:08:05 2011] [notice] Parent: Child process exited successfully.

Look at the Apache error log.
This error almost always occurs when another user shuts down a multi-user server. The Apache error log will tell you what happened so we can help if there are further issues.
Edit
Try this- go to C:\WINDOWS\System32\drivers\etc and make sure you have the following in it:
127.0.0.1 localhost
Restart WAMP, and see if anything has changed.

I got the same error. So, I quit the skype and run the wamp as administrator it works. After that I changed the skype listen port to 88. Now the wamp works fine.
Its the port conflict. So, either you may change the localhost port to 88 in httpd.config file.

This can also be caused by own stupidity, like in my case:
I've had a script on my server (Windows 2008 R2) that was configured to run every 5 minutes. It contained the following two lines:
net stop Apache2.4
net start Apache2.4
Strange enough this script was present for years and did never cause any remarkable effect for my websites. Only recently, Uptime Robot detected some downtimes.
To be honest, I don't know anymore why I had this script configured at all.
Solution:
To solve this, I simply deactivated the script in the Windows Task Scheduler.

Have you been messing with your httpd.conf file? I was messing with mine, and changed the first "listen" bit to Listen 8080 and got rid of a the 303 error and am able to start apache. Now I have a 404 error...which is an improvement I guess.

I have both iis and wamp installed on my windows machine, and accidentally I have opened iis for port 80, which caused the error you have experienced.
Either change the port that Wamp listens to, either the port the IIS listens to

Related

Corrupted Symfony 2 vendors install

Facts: using standard Symfony 2.0.10 release (includes vendors) all works fine. However with "without-vendors" release something get corrupted after issuing:
php bin/vendors install
Files are fetched but, at the end, accessing any page under web/ ends with Aborted connection. I'm manually installing vendors becuase of doctrine fixtures.
I don't know if the cause is Git for Windows and i'm going to investingate this. Any help would be appreciated.
EDIT: same happens with new version of Symfony (2.0.11). No errors after installing vendors but got Aborted connection requesting any Symfony2 page.
EDIT: this is the error.log file found in Apache2 logs directory after cleaning up and requesting http://localhost/Symfony/web/app_dev.php/_configurator/:
[Sun Feb 26 03:04:22 2012] [notice] Apache/2.2.22 (Win32) PHP/5.3.10 configured -- resuming normal operations
[Sun Feb 26 03:04:22 2012] [notice] Server built: Feb 22 2012 19:25:43
[Sun Feb 26 03:04:22 2012] [notice] Parent: Created child process 2588
[Sun Feb 26 03:04:22 2012] [notice] Child 2588: Child process is running
[Sun Feb 26 03:04:22 2012] [notice] Child 2588: Acquired the start mutex.
[Sun Feb 26 03:04:22 2012] [notice] Child 2588: Starting 64 worker threads.
[Sun Feb 26 03:04:22 2012] [notice] Child 2588: Starting thread to listen on port 80.
[Sun Feb 26 03:04:22 2012] [notice] Child 2588: Starting thread to listen on port 80.
[Sun Feb 26 03:04:33 2012] [notice] Parent: child process exited with status 255 -- Restarting.
open your deps file; and change the address of the git repositories: http for https; this solve your problem.
After
An outdated Git version can't handle http:// and http:// git repository URIs properly, at least in my experience with Debian stable.
If you see 403 errors consider updating Git to 1.7.x or replacing any occurences of http:// and https:// with git:// in your deps file.
Answer to myself: the problem seems to be the checkout style: i'm under Windows and i've used "Checkout Windows style, commit Unix style". This causes (for some reason i can't understand) Apache crash with 255 status.
Setting Git for using "Checkout Unix style, commit Unix style" fixed the problem. Thanks for helping.
Check your web server error.log. If connection aborts, its probably a runtime issue and is not directly related to having vendors installed manually. It could be an an issue with your cache directory.
You can add doctrine-fixtures manually.
See the new target for the DoctrineFixtureBundle below:
[doctrine-fixtures]
git=https://github.com/doctrine/data-fixtures.git
[DoctrineFixturesBundle]
git=https://github.com/doctrine/DoctrineFixturesBundle
target=/bundles/Doctrine/Bundle/DoctrineFixturesBundle
old target=/bundles/symfony/Bundle/DoctrineFixturesBundle
new target=/bundles/Doctrine/Bundle/DoctrineFixturesBundle
To load the fixtures correctly, you have to add the type of the manager in the load function:
public function load(ObjectManager $manager)
{
//...
}

Performance issue with php/apache/windows. Connection reset

I'm having a rather big problem with a site performance. It's a php site on Apache on Windows Server 2003.
Web site is basically crashing with 'connection was reset' or 'cannot load web page' quite often. httpd process in Windows takes about 100mb on normal traffic, having about 1gb of memory still free
This is first time I host a php site on Windows (WIndows was requirement in this case) and I'm not sure what are my options
Thanks
Apache log is displaying the following (sorry for pasting it like that, couldn't do it as 'code block' from some reason. This surely doesn't look right. Any ideas what could be going on?
[Tue Nov 08 16:44:43 2011] [notice] Parent: Received restart signal --
Restarting the server.
[Tue Nov 08 16:44:43 2011] [notice] Child 2072: Exit event signaled.
Child process is ending.
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.67.1 for ServerName
[Tue Nov 08 16:44:44 2011] [notice] Apache/2.2.17 (Win32)
mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.2.17 configured -- resuming normal
operations
[Tue Nov 08 16:44:44 2011] [notice] Server built: Oct 18 2010 01:58:12
[Tue Nov 08 16:44:44 2011] [notice] Parent: Created child process 7692
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.67.1 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.67.1 for ServerName
[Tue Nov 08 16:44:44 2011] [notice] Child 2072: Released the start
mutex
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Child process is
running
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Acquired the start
mutex.
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Starting 1000 worker
threads.
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Starting thread to
listen on port 2090.
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Starting thread to
listen on port 8011.
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Starting thread to
listen on port 8080.
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Starting thread to
listen on port 443.
[Tue Nov 08 16:44:44 2011] [notice] Child 7692: Starting thread to
listen on port 80.
[Tue Nov 08 16:44:45 2011] [notice] Parent: child process exited with
status 0 -- Restarting.
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.67.1 for ServerName
Windows event viewer is throwing the following
Error - VsJITDebugger. An unhandled win32 exception occurred in httpd.exe [4416]. Just-In-Time debugging this exception failed with the following error: Debugger could not be started because no user is logged on.
Can anyone help with this?
That '[notice] Parent: child process exited with status 0 -- Restarting' is describing the issue here. Tho it describes it in vary vague way. Server is basically restarting on it's own every few minutes. I took the site down with a holding page and the error and restart ddidn't occure. I added an html page and bombed it with combinations of requests using AB. It would always crash at requests close to number of ThreadsPerChild specified in mpm config, which I have set to 1000. Each crash followed with an error
apr_socket_recv: An existing connection was forcibly closed by the remote host.
(730054)
That error only displays when benchmarking. Nothing like that appears in apache log. As soon I switch the site back live, it starts to crash every few minutes. The site generates about 100 requests per page and is also using 2-3 ajax calls per page (while loading)
I spent hours searching the web for possible solutions. Found nothing that fits. I'm completely out of options. I'm not even experienced running apache on windows as during 5 years I work in the business I never had to run php sites on Windows. I haven't seen such error on linux neither
There are two places where you should have a look:
Regular Apache logs, located in the logs folder inside Apache installation.
Windows event viewer, located in Windows control panel
In particular, the second one will log Apache crashes and will possibly reveal additional details.

The infamous Apache error "Parent: child process exited with status 3221225477"

I've read some questions and responses related to the infamous Apache error
Apache error [notice] Parent: child process exited with status 3221225477 — Restarting
But nothing could help me so far. What I'm asking to you is if I used a Linux version, could the script crash Apache for the same reason?
By the way if anyone has any suggestion for my case here is Apache's error.log
[Mon Aug 08 14:31:44 2011] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Mon Aug 08 14:31:44 2011] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Mon Aug 08 14:31:44 2011] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Mon Aug 08 14:31:44 2011] [notice] Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_autoindex_color PHP/5.1.6 configured -- resuming normal operations
[Mon Aug 08 14:31:44 2011] [notice] Server built: Aug 13 2006 19:16:43
[Mon Aug 08 14:31:44 2011] [notice] Parent: Created child process 4364
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Child process is running
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Acquired the start mutex.
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Starting 250 worker threads.
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Starting thread to listen on port 8088.
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Starting thread to listen on port 8086.
I can't understand why moving dlls around the filesystem solve most problems and all the suggestions in the related questions which were about moving libraries didn't work for me.
I'm running an old XAMPP release with PHP 5.1.6 (XAMPP for Windows 1.5.4) and working with Doctrine ORM (Yes, I'm aware that Doctrine requires PHP 5.2.3+).
I've just had this same problem on a WAMP installation. I tracked it down to a bit of my own rubbish code. I had a method calling itself.
Here's an example:-
<?php
echo "Welcome to stupid class!";
class stupid_class {
public $example_data;
function stupid_function($Data) {
self::stupid_function($Data);
if($Data=="Hello") return true;
else die("Incorrect data passed through.".$Data."<br />");
}
}
$myClass = new stupid_class();
$myvalue = $myClass->stupid_function("Hello");
?>
I know this is hardly an ideal example of great code, (it was actually a typo) but I would have expected there to be some error thrown before getting a 'connection was reset' message.
So I guess an answer would be, check through all your methods to make sure that you're not calling one infinitely.
I hope this helps someone to figure out why this is happening in PHP, Apache.
Cheers
Tee
In my case it was the php extension APC (php_apc.dll, 3.1.10-5.4-vc9-x86, threadsafe), which caused the error.
I used XAMPP 1.8.2 with PHP 5.4.19 and Apache 2.4.4
Since it could be caused by another extension as well, it might be a good starting point to restore the original php.ini from the xampp distribution. If this one works well, try to change it line by line to your desired configuration (starting with the extension list).

Localhost cannot be accessed from browser

I have worked on localhost all these while till I ran some updates on Windows 7 and restarted. Now I can no longer access to localhost from browser. But Aapache service is running. Showing on system tray. May I know what is the problem?
Error log:
[Thu Dec 16 00:33:35 2010] [notice] Parent: Received restart signal -- Restarting the server.
[Thu Dec 16 00:33:35 2010] [notice] Child 4248: Exit event signaled. Child process is ending.
[Thu Dec 16 00:33:36 2010] [notice] Child 4248: Released the start mutex
[Thu Dec 16 00:33:37 2010] [notice] Child 4248: All worker threads have exited.
[Thu Dec 16 00:33:37 2010] [notice] Child 4248: Child process is exiting
[Thu Dec 16 00:33:40 2010] [notice] Apache/2.2.17 (Win32) PHP/5.2.14 configured -- resuming normal operations
[Thu Dec 16 00:33:40 2010] [notice] Server built: Oct 18 2010 01:58:12
[Thu Dec 16 00:33:40 2010] [notice] Parent: Created child process 4672
[Thu Dec 16 00:33:40 2010] [notice] Child 4672: Child process is running
[Thu Dec 16 00:33:40 2010] [notice] Child 4672: Acquired the start mutex.
[Thu Dec 16 00:33:40 2010] [notice] Child 4672: Starting 64 worker threads.
[Thu Dec 16 00:33:40 2010] [notice] Child 4672: Starting thread to listen on port 80.
I found that Local Address 0.0.0.0:80 is bound to PID 1476 which is httpd.exe
check if your hosts file under C:\Windows\System32\drivers\etc\hosts has been changed by some other program just a guess ...
Maybe it is an error of the DNS service. Have you tried to access the system using the PCs IP-Address or the IP 127.0.0.1 (like http://127.0.0.1)?
Try forwarding port 80.
Also, restart the Apache server once.
En last but not least, a seengee suggested, if you'r running Skype, close it and try again.
I've seen Skype cause this issue in the past as i think it falls back to port 80 by default if its main port is blocked. If you use Skype, try turning it off and check again
Check the logs. Check the httpd instance and see if it appears to be functioning smoothly.
I had a similar problem a month back where the electrician killed the power to my computer and I wound up with a corrupt Apache and MySQL install. I had to re-install and copy the .conf files over to resolve the issue.
Edit
Considering this is an update, check your firewall to assure the update did not restore it to it's defaults (stranger things have happened).
before you restarted, did you install anything? What other services are running? Check if port 80 is already taken ...
Run notepad.exe as administrator. Open c:\windows\system32\drivers\etc\hosts file.
put this line :
127.0.0.1 localhost
save the file. you should have localhost.
Other thing is misconfig in your httpd.conf.
open your httpd.conf (usualy in c:\program files\apache software foundation\apache2.2\conf).
check this line:
ServerName xxxxx:80
where xxxx should be localhost or 127.0.0.1
change it if necessary, and save. Restart apache services.

wamp server not working? or bad php code

I have this PHP code:
<?php
$username="root";
$password="******";// censored out
$database="bazadedate";
mysql_connect("127.0.0.1",$username,$password); // i get unknown constant localhost if used instead of the loopback ip
#mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM backup";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
$raspuns="";
while ($i < $num) {
$data=mysql_result($result,$i,"data");
$suma=mysql_result($result,$i,"suma");
$cv=mysql_result($result,$i,"cv");
$det=mysql_result($result,$i,"detaliu");
$raspuns = $raspuns."#".$data."#".$suma."#".$cv."#".$det."#";
$i++;
}
echo "<b> $raspuns </b>";
mysql_close();
?>
And it should return a single string containing all data from the table. But it says "connection reset when loading page".
the log is :
[Tue Jun 15 16:20:31 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Tue Jun 15 16:20:31 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Tue Jun 15 16:20:31 2010] [notice] Server built: Dec 10 2008 00:10:06
[Tue Jun 15 16:20:31 2010] [notice] Parent: Created child process 2336
[Tue Jun 15 16:20:31 2010] [notice] Child 2336: Child process is running
[Tue Jun 15 16:20:31 2010] [notice] Child 2336: Acquired the start mutex.
[Tue Jun 15 16:20:31 2010] [notice] Child 2336: Starting 64 worker threads.
[Tue Jun 15 16:20:31 2010] [notice] Child 2336: Starting thread to listen on port 80.
[Tue Jun 15 16:20:35 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Tue Jun 15 16:20:35 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Tue Jun 15 16:20:35 2010] [notice] Server built: Dec 10 2008 00:10:06
[Tue Jun 15 16:20:35 2010] [notice] Parent: Created child process 1928
[Tue Jun 15 16:20:35 2010] [notice] Child 1928: Child process is running
[Tue Jun 15 16:20:35 2010] [notice] Child 1928: Acquired the start mutex.
[Tue Jun 15 16:20:35 2010] [notice] Child 1928: Starting 64 worker threads.
[Tue Jun 15 16:20:35 2010] [notice] Child 1928: Starting thread to listen on port 80.
Any idea why it outputs nothing?
$num=mysql_numrows($result);
should be
$num=mysql_num_rows($result);
Thats atleast 1 issue.
You should also look into mysql_fetch_assoc...
# this will loop through each record
while($row = mysql_fetch_assoc($result)) {
$data = $row['data'];
$sum = $row['suma'];
....
}
You need to enable error reporting to see what's going on... Edit php.ini, and set error_reporting=2147483647 and display_errors=1. Then run the script again to check for all errors...
From the log snippet, something's killing the Apache child handling the request, which causes an immediate shutdown of the TCP connection, which your browser sees as a "Connection reset".
You may want to investigate using 'localhost' instead of '127.0.0.1' for your database connection. MySQL treats "localhost" differently than an IP address, and tries to connect via sockets, rather than a TCP connection - this is a speed optimization as local sockets are faster than TCP sockets. Your MySQL install may not be listening for TCP connections (skip_networking = 1).
As well, you should NEVER connect to your database as the root account, especially if this will be a public-facing site. The root account can access anything and do anything in MySQL, which is NOT what you want to expose to the world. Read up on the GRANT syntax and create a MySQL account with limited privileges and use that instead. Most likely your site would only need insert/update/select/delete.
Beyond that, change your query fetching logic to use what Lizard suggested above, and start doing some debugging - figure out which line is causing the error, and how many iterations it took to get there. You may be exhausting some kind of resource which kills Apache/PHP.
I have experienced this error many times and the solution for me was to increase the apache binary (apache.exe or httpd.exe) stack size. You will need the Visual studio to do that, but you can use the trial version, as I did. You don't even need to turn it on. The command is:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64>editbin /STACK:8000000 "c:\Program Files (x86)\WAMP\apache\bin\apache.exe"
Change the paths above according to your environment of course.
In the Visual studio directory VC/binary/ there are several utilities by the name editbin.exe. Use the one suitable for you platform or try them one by one, until it works (as I did).

Categories