472,145 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

client ignores close of connection?

Hi folks,

we're seeing strange behaviour of mysql connections over network here
lately. Server and client are on different machines. Server (corpdb) is
Mysql 3.23.52 on FreeBSD 4.6.2-RELEASE, client is php application
(portal), Mysql-client 3.23.55, PHP 4.2.3, Apache 1.3.27 on FreeBSD
4.8-RELEASE. The boxes are connected over Cisco Catalyst switch in the
same LAN. There is ipf firewall running on portal, no firewall running
on corpdb.

The problem we're seeing is manifesting as failure to connect to mysql
server from the php application (pconnect function). I did tcpdump
traces on both machines, and my theory what's happening follows:

Imagine long time open and idle connection. Mysql server decides to
close this connection (13:55:06), it sends FIN to client. Client ACKs
the FIN, but not send his FIN as in ordinary TCP connection close.
Server closes the connection on his end, but client is keeping
connection opened on his end. After half hour (14:28:25) client want to
talk to the server and sends packet (P) to server. Server no longer have
opened connection on that port, responds with RST. Client replies with
FIN and returns connection error to PHP.

My question here is: where could be bug? I suspect mysql client.

server (corpdb) trace

09:55:03.129853 corpdb.hide.vol.cz.3306 > portal-nfs.insitu-conf: . ack
430304300 win 57920
09:55:03.130030 portal-nfs.insitu-conf > corpdb.hide.vol.cz.3306: . ack
1 win 57920 <nop,nop,timestamp 325740487 2543523238> (DF)
11:55:03.218107 corpdb.3306 > portal-nfs.insitu-conf: . ack 1 win 57920
11:55:03.218330 portal-nfs.insitu-conf > corpdb.3306: . ack 1 win 57920
<nop,nop,timestamp 326460317 2543523238> (DF)
13:55:01.704419 corpdb.3306 > portal-nfs.insitu-conf: . ack 1 win 57920
13:55:01.704636 portal-nfs.insitu-conf > corpdb.3306: . ack 1 win 57920
<nop,nop,timestamp 327180146 2543523238> (DF)
13:55:06.604665 corpdb.3306 > portal-nfs.insitu-conf: F 1:1(0) ack 1 win
57920 <nop,nop,timestamp 2546403738 327180146> (DF)
13:55:06.604893 portal-nfs.insitu-conf > corpdb.3306: . ack 2 win 57920
<nop,nop,timestamp 327180636 2546403738> (DF)
14:28:25.659438 portal-nfs.insitu-conf > corpdb.3306: P 1:6(5) ack 2 win
57920 <nop,nop,timestamp 327380492 2546403738> (DF)
14:28:25.659458 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209471279(0) win 0
14:28:25.659466 portal-nfs.insitu-conf > corpdb.3306: F 6:6(0) ack 2 win
57920 <nop,nop,timestamp 327380492 2546403738> (DF)
14:28:25.659474 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209471279(0) win 0

client (portal) trace

13:55:00.480782 corpdb.3306 > portal-nfs.insitu-conf: . ack 430304300
win 57920
13:55:00.480818 portal-nfs.insitu-conf > corpdb.3306: . ack 1 win 57920
<nop,nop,timestamp 327180146 2543523238> (DF)
13:55:05.379852 corpdb.3306 > portal-nfs.insitu-conf: F 1:1(0) ack 1 win
57920 <nop,nop,timestamp 2546403738 327180146> (DF)
13:55:05.379910 portal-nfs.insitu-conf > corpdb.3306: . ack 2 win 57920
<nop,nop,timestamp 327180636 2546403738> (DF)
14:28:23.961669 portal-nfs.insitu-conf > corpdb.3306: P 1:6(5) ack 2 win
57920 <nop,nop,timestamp 327380492 2546403738> (DF)
14:28:23.961695 portal-nfs.insitu-conf > corpdb.3306: F 6:6(0) ack 2 win
57920 <nop,nop,timestamp 327380492 2546403738> (DF)
14:28:23.961851 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209471279(0) win 0
14:28:23.961862 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209471279(0) win 0

--
Pav Lucistnik <pa*@oook.cz>
What do we know about love? Love is like a pear. Pear is sweet and have
a specific shape. Try to exactly define the shape of a pear.
-- Marigold: 50 Years Of Poetry
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1651

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Pav Lucistnik | last post: by
5 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.