Bug #52948 [Opn->Fbk]: Improper connection closing logic leads to TIME_WAIT sockets on server
| From: | cataphract@php.net | Date: | Thu, 30 Sep 2010 03:14:43 +0000 |
| Subject: | Bug #52948 [Opn->Fbk]: Improper connection closing logic leads to TIME_WAIT sockets on server | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-154761@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52948&edit=1
ID: 52948
Updated by: cataphract@php.net
Reported by: gilles dot rayrat at continuent dot com
Summary: Improper connection closing logic leads to TIME_WAIT
sockets on server
-Status: Open
+Status: Feedback
Type: Bug
Package: MySQLi related
Operating System: Any
PHP Version: 5.2.14
Block user comment: N
New Comment:
I'm sorry, I didn't get this. If I understand correctly, you would
prefer the web server to be in a TIME_WAIT, rather than the database
server, and for that it would have to send the first FIN packet.
But why would you prefer the web server to be in a TIME_WAIT state? The
front-end side typically needs to handle many more connections.
Additionally, it would be nice if you provided an example script and its
ouput (in this case, a tcpdump).
Previous Comments:
------------------------------------------------------------------------
[2010-09-29 08:36:08] gilles dot rayrat at continuent dot com
Description:
------------
Similarly to connector/j bug reported here:
http://bugs.mysql.com/bug.php?
id=56979, there is a problem with mysql disconnection logic where the
TCP
connection TIME_WAIT state is found on the server rather than on the
client. With
multiple clients and multiple connection, the MySQL server can run out
of file
descriptors quickly.
The disconnect method should first set EOF to its input, then send the
QUIT
command, then set its output to EOF, then close the socket
Note: I guess the same bug appears in MySQL-non-i as well
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52948&edit=1