473,800 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,timest amp 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,timest amp 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,timest amp 327180146 2543523238> (DF)
13:55:06.604665 corpdb.3306 > portal-nfs.insitu-conf: F 1:1(0) ack 1 win
57920 <nop,nop,timest amp 2546403738 327180146> (DF)
13:55:06.604893 portal-nfs.insitu-conf > corpdb.3306: . ack 2 win 57920
<nop,nop,timest amp 327180636 2546403738> (DF)
14:28:25.659438 portal-nfs.insitu-conf > corpdb.3306: P 1:6(5) ack 2 win
57920 <nop,nop,timest amp 327380492 2546403738> (DF)
14:28:25.659458 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209 471279(0) win 0
14:28:25.659466 portal-nfs.insitu-conf > corpdb.3306: F 6:6(0) ack 2 win
57920 <nop,nop,timest amp 327380492 2546403738> (DF)
14:28:25.659474 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209 471279(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,timest amp 327180146 2543523238> (DF)
13:55:05.379852 corpdb.3306 > portal-nfs.insitu-conf: F 1:1(0) ack 1 win
57920 <nop,nop,timest amp 2546403738 327180146> (DF)
13:55:05.379910 portal-nfs.insitu-conf > corpdb.3306: . ack 2 win 57920
<nop,nop,timest amp 327180636 2546403738> (DF)
14:28:23.961669 portal-nfs.insitu-conf > corpdb.3306: P 1:6(5) ack 2 win
57920 <nop,nop,timest amp 327380492 2546403738> (DF)
14:28:23.961695 portal-nfs.insitu-conf > corpdb.3306: F 6:6(0) ack 2 win
57920 <nop,nop,timest amp 327380492 2546403738> (DF)
14:28:23.961851 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209 471279(0) win 0
14:28:23.961862 corpdb.3306 > portal-nfs.insitu-conf: R
4209471279:4209 471279(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 1263

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

Similar topics

0
1741
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, 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.
2
3944
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a test on it that if the network broken at the time the client have already send the remoting request and waiting for the server, the client side will wait infinitely by default, even if i already set the executionTimeout to 90seconds in...
8
41439
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 into a CLOSE_WAIT state ad infinitum and never closes fully until my client and server applications shut down. Ive disabled lingeroptions. Is there anything else easy that i can do to force the loopback to close immediately?
4
6741
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
5577
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, SocketFlags.None); When the client exits, I close the socket with a specific message (like "end") and the thread terminate in a proper manner, but If my client crashes, the server is still waiting for receiving data, and
14
12798
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 whether to accept(read) the body. if server decided to throw(dump) the request's body, it'll send back a response message, such as "resource already exists" and close the connection.
3
3491
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 by forking the parent connection. So far I have this, the code downloads only one file, and then gives the following error "Transfer Completed425 Unable to build data connection: Invalid argument" Appreciate if someone can help me here. The...
5
5475
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 our own configuration management that follows our application lifecycle (development/system test/production). Also, most of the proxies we build are for the middle-tier layer. 2. Create a wrapper to follow WCF Client best practices (proxy.close...
10
4257
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 active again and displays the messages. Here is my server code: import java.io.*; import java.net.*; public class serverForm extends javax.swing.JFrame { private PrintWriter output = null;
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10504
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10251
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.