List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 17 1999 8:10am
Subject:Disconnections Part 2
View as plain text  

>>>>> "Vinny" == Vinny Stoessel <xaymaca@stripped> writes:

Vinny> Hello,
Vinny> I posted a couple of days ago how I was noticing 
Vinny> brief moments of "Cannot connect to Mysql" errors
Vinny> from my local apache server that connects via sockets
Vinny> in Linux 2.0.35 and a remote one that connects via 
Vinny> TCP. I have set max_connections to 600. The web servers 
Vinny> are each limited to 200 children so I should never have 
Vinny> to worry about ever reaching the 600 mysql connection
Vinny> limit. yet I still get occasional connection refusals.
Vinny> Now I did see something in the error log:

Vinny> 990415 15:01:57  Error in accept: Invalid argument
Vinny> 990415 15:12:00  Error in accept: Invalid argument
Vinny> 990415 15:22:25  Error in accept: Invalid argument

Vinny> any one know what this is telling me?

Vinny> I enabled logging and grepping out "Connect" I get 

Vinny> 990415 15:31:22       1 Connect    client@localhost on hitlist
Vinny>                       2 Connect    client@localhost on 
Vinny> 990415 15:31:25       3 Connect    client@stripped on 
Vinny> 990415 15:31:34       4 Connect    client@localhost on adserver
Vinny>                       5 Connect    client@localhost on 
Vinny> 990415 15:31:43       6 Connect    client@stripped on 
Vinny> 990415 15:31:44       7 Connect    client@localhost on 
Vinny> 990415 15:31:48       8 Connect    client@localhost on xaymaca
Vinny>                       9 Connect    client@localhost on 
Vinny>                      10 Connect    client@localhost on 

Vinny> should the Connect argument after "user@host on" be blank
Vinny> like some these lines are showing?

The empty 'on' part means that client didn't specify a database name
when connecting.

I assume you have set up your Linux system with enough file descriptors?

Vinny> I am running mysql 3.22.21 Linux (Binaries) on a 
Vinny> 233 Pentium with 192M of Ram. apache and a realaudio server
Vinny> also run on this box. Any insight is appreciated.
Vinny> Thanks.

I am aware of a kernel bug in Linux 2.2 that if one does very rapidly 
TCP/IP connections then after a while one will get failed connections.
This appears to be some inner resource in Linux that is not freed at
once, but freed eventually as this problems disappears after a while.
(I haven't noticed this problem with a 2.0 kernel, but...)

Do you only get refused connections on the remote machine or also on
the local one?


PS: If anyone is interested in a full TCP/IP test that shows this
    problem I have one available.  I have posted this a couple of
    times to Linux developers but never got any responses.
Disconnections Part 2Vinny Stoessel16 Apr
  • Disconnections Part 2Michael Widenius17 Apr