At 18.11.2001 02:06, Bob Maple wrote:
>I've been through the bug database a couple of times, and scanned through
>the list archives before joining, but haven't exactly found anything that
>matches what is happening in my case.
>First, dirty details: I am running MySQL 3.23.33, Apache 1.3.19, and PHP
>4.0.6 under an RH system on kernel 2.2.19.  PHP running as a module in

Good, pretty complete details.

>I am having a little quirk with persistant connections with MySQL.  The
>connections themselves work;  However, after a while when the connections
>time out, they don't seem to be closing all the way.  For instance, right
>now if I do a netstat, among some other connections I get:
>Proto Recv-Q Send-Q Local Address
>tcp        1      0        CLOSE


This is strange as the normal output from netstat should look like this
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:46764         localhost:imap4s        ESTABLISHED
tcp        0      0 localhost:imap4s        localhost:46764         ESTABLISHED

Yours seem to miss out at least to headings, who knows what else is missing?

and there is no such state as "CLOSE", so I'll assume for the rest of the email
that you're refering to CLOSED.

>This has been there and been in "CLOSE" state all day.  It was there
>yesterday. It will be there tomorrow.  MySQL has terminated the connection
>as far as it cares (if I "mysqladmin processlist", no connections show up.)
>Indeed, if I shut down the MySQL server, the socket remains.  Only if I shut
>down Apache will it ever go away.
>So, if left going for awhile, tons of these dead sockets will pile up.

nope, if you leave it going for awhile nothing out of the ordinary happens,
the socket will be reused (when it's time is up).

the reason it doesn't "go away" until Apache is closed is that this is apache's
socket, and not MySQL's, as the forreign address is the :mysql.

>Before I post a bug report, anyone have any ideas?

Yes, read netstat(8).

and I quote:
CLOSED The socket is not being used.

if the socket was dead you'd either see
               The remote end  has  shut  down,  waiting  for  the
               socket to close.

               The  remote  end  has  shut down, and the socket is
               closed. Waiting for acknowledgement.

(or even a time_wait, but only for a limited time, unless you've got some
nifty problems with loopback.)

What is the problem here really?
MySQL isn't chewing resources, Apache isn't chewing resources, the fact of
the matter is that you're seeing closed sockets, sockets that will be 
reused when
apache+php reconnects to MySQL.

The only intriguing part about your post is that the Recv-Q is still 1, but 
all in all
I wouldn't worry...

Andreas D Landmark / noXtension
Real Time, adj.:
         Here and now, as opposed to fake time, which only occurs there
and then.

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to