Bug #17581 Updated: mysql_connect hangs Apache
| From: | mfischer@php.net | Date: | Mon, 03 Jun 2002 18:03:04 +0000 |
| Subject: | Bug #17581 Updated: mysql_connect hangs Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9368@lists.php.net to get a copy of this message | ||
ID: 17581
Updated by: mfischer@php.net
Reported By: hermannj@slu.edu
-Status: Open
+Status: Feedback
Bug Type: Apache related
Operating System: Tru64 Unix
PHP Version: 4.1.2
New Comment:
Does this also occure if you use external libraries?
Can you also try to upgrade to 4.2.1, enable with debug (also on apache
if possible), and use the strace utility on httpd -X to track down
where it actually hangs?
Btw, which apache version?
Previous Comments:
------------------------------------------------------------------------
[2002-06-03 13:52:23] hermannj@slu.edu
Apache child processes hang when:
1. A PHP script (let's call it connect.php) sends a mysql_connect
request to a MySQL server.
2. The MySQL server is powered down - completely shut off.
Example of connect.php:
<?php mysql_connect("db","user","pass") || or
die("OMG!"); ?>
ps ax | grep httpd | wc shows 14 httpd processes
After calling http://www.domain.com/connect.php with
a browser
ps ax | grep httpd | wc shows 15 httpd processes
Hitting stop on the browser has no affect. 15 processes remain.
After calling /apache/bin/ap -n 200 -c 200
http://www.domain.com/connect.php
This will call the script 200 times concurrently.
ps ax | grep httpd | wc shows 152 httpd processes (MaxClients reached)
Now going to http://www.domain.com/ produces nothing but a
timeout.
Since there is no mysql_connect timeout, the Apache processe hang
indefinately.
Result: server hosed! This is much too fragile.
Gracefuly restarting Apache has no affect since it is waiting for the
child processes to complete. You must stop Apache and start Apache to
resume operations.
Environment:
Tru64 Unix
PHP 4.1.2
MySQL builtin libraries
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17581&edit=1