473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 1707

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pav Lucistnik | last post by:
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,...
8
by: Claire | last post by:
I'm trying to debug my network application ie I want to check my error handling when the connection is broken. Im using 127.0.0.1 as the connection address. Unfortunately, the client socket goes...
4
by: rs | last post by:
how I the client tell the server that the socket is closed? or this there an even that informs the server that the clients socket is close? Oh, I am using vb.net 2003 Thanks
9
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024,...
14
by: ahlongxp | last post by:
Hi, everyone, I'm implementing a simple client/server protocol. Now I've got a situation: client will send server command,header paires and optionally body. server checks headers and decides...
3
by: dynamo08 | last post by:
Hi, I am new to socket programming, I wrote an ftpclient which connects to an ftp server and downloads a file to the client computer. Now in one client connection I want to download multiple files...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
I'm researching what is the best way to create a generic WCF proxy wrapper that has the following requirements: 1. Remove the System.ServiceModel config section requirement for clients. We have...
10
by: Elaine121 | last post by:
Hi i've been batteling for hours and can't seem to find the problem. When my server runs and I press the connect button the gui freezes until the client gui is terminated.. only then the gui becomes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.