473,788 Members | 2,754 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 1739

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

Similar topics

0
1262
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.
8
41436
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
6738
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
5575
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
12796
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
3490
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
5474
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
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10366
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...
0
9969
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...
1
7518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
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
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.