Hi.

On Wed 2002-09-11 at 15:10:22 -0400, [EMAIL PROTECTED] wrote:
> 
> > On Wed, Sep 11, 2002 at 02:55:01PM -0400, Kent Hoover wrote:
> > > Version: MySQL.3.22.32-log
> > > 
> > > Does this problem ring a bell with anyone?
> > > I'm seeing two undesired behaviors, both, *I think* 
> > > seem to be because I'm pounding a lot of connections
> > > against the same server/table, all from the same 
> > > remote host. The workload that reaches MySQL is
> > > a succession of CONNECT->QUERY (very simple)-> QUIT,
> > > say 200 times per second. After about the first 4000
> > > connections, MySQL restarts, complaining that 
> > > mysqld is hanging.

It is well possible, that you run against a TCP stack limit. To quote
Monty:

----------------------------------------------------------------------
The problem is that when you close a TCP/IP socket there is a timeout
of up to 30 seconds until the resources are properly freed.  This
means that after a while you will run out of free TCP/IP sockets.
----------------------------------------------------------------------

They are in a state of TIME_WAIT (this phase stays for 120 secs
according to RFC, but will be lower in real implementations). Newer
kernels (i.e. 2.4.x) should encounter this problem far later, AFAIK,
because they have set the timeout lower.

The only thing that doesn't fit into this is that MySQL shouldn't
restart. But maybe that is the work of some watchdog which doesn't
know better?

> We're running Red Hat Linux 6.2. 
> 
> Oh, yes, we've considered upgrading. Kind of hesitant to take 
> that step so far.

Recompiling the kernel should help. From [EMAIL PROTECTED]:

----------------------------------------------------------------------
in linux, look at /usr/src/linux/include/net/tcp.h and modify this field
and then recompile the kernel

#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to successfully
                                  * close the socket, about 60 seconds  */
----------------------------------------------------------------------

> I've read through the "Fixed in version { }" sections of the
> manual, didn't recognize what I have here, and was hoping that
> someone out here would say "Yes, I remember that, and it was
> fixed!" 

HTH,

        Benjamin.

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to