php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30666 mysql_connect reports unable to connect after numerous requests
Submitted: 2004-11-02 20:31 UTC Modified: 2004-11-08 15:43 UTC
From: eugene dot kharkov at videinfra dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.9 OS: W2K Pro, Win XP Pro,Win 2003 Srv
Private report: No CVE-ID: None
 [2004-11-02 20:31 UTC] eugene dot kharkov at videinfra dot com
Description:
------------
I executed a simple script on Windows and Linux platforms. I used Apache Jmeter to simulate server load (5 concurrent connections per second to each platform). In both cases I used the same MySQL server. Settings in php.ini file on both platforms were the same. After a number of requests, script on Windows platform started responding Can't connect to MySQL server on '10.0.1.4' (10048), whereas script on Linux continue its work.

Reproduce code:
---------------
<?
$conn = mysql_connect ( '10.0.1.4', 'root', '') 
or die("Could not connect: " . mysql_error());
mysql_select_db('lub2', $conn);
$res = mysql_query("SELECT title FROM pages_lv0 WHERE id = 1", $conn) 
or die("Invalid query: " . mysql_error()); 
mysql_close($conn);
echo "ok";
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-02 23:38 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You\'re probably out of mysql connections.
 [2004-11-08 15:43 UTC] eugene dot kharkov at videinfra dot com
It actually implies a bug in PHP. 
As I?ve been saying, I simultaneously run the SAME script on two different servers, one running Linux and another Windows. The script connects to REMOTE MySQL on another Linux machine. After a number of requests the Windows gives the described error. If you read that carefully, which I believe you do, you would see that this implies the bug in PHP. I will submit this as a new bug, since I believe nobody here reads the comments.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC