Bug #6580 | server connection errors | ||
---|---|---|---|
Submitted: | 11 Nov 2004 15:45 | Modified: | 12 Nov 2004 0:26 |
Reporter: | David Edwards | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 4.1.7 | OS: | Windows (Win32 (XP, 2003)) |
Assigned to: | CPU Architecture: | Any |
[11 Nov 2004 15:45]
David Edwards
[12 Nov 2004 0:26]
MySQL Verification Team
I tested your sample and the error I got around 4000 connect/closing. However this a Windows behavior, please read: http://support.microsoft.com/kb/q196271/ Subject: Unable to Connect TCP Ports above 5000 Thank you for the bug report.
[12 Nov 2004 14:17]
David Edwards
I'm using port 3306 every time, not ports above 5000, so the max port issue on Windows doesn't apply - and implementing the fix in the MS article doesn't solve the problem. When using MyODBC 3.51.10 the error is: [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10048) If the 10048 relates to a socket error code, this would be WSAEADDRINUSE rather than the WSAENOBUFS mentioned in Q196271.
[12 Nov 2004 16:40]
David Edwards
OK, sorry, it's the Win32 delay in releasing a port after closing it that's the problem. Thanks.
[12 Mar 2009 21:17]
yves sucaet
I'm experiencing the same problem, though with PHP. Here's the script I use to test: <?php $p = 0; $n = 0; for ($i = 0; $i < 120; $i++) { $conn = mysql_connect("www.metnetdb.org", "metnet3_editor", "my"); if ($conn) { echo "Success!\n"; mysql_close($conn); $p++; } else { echo "Failed test $i\n"; $n++; } sleep(1); } echo "\n$p successes, $n failures\n"; ?> The results are unpredictable. Out of 120 attempts, maybe 114 will be successful, 6 will fail. I'm using WinXP Pro x64 edition and PHP 5.2.6
[17 Apr 2011 7:50]
MySQL Verification Team
folks seeing problems could first read/implement http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html#can-not-connect-to-s... that might solve it.