Re: New connections stall with 20k+ open sockets

Willy Tarreau (willy@w.ods.org)
Mon, 29 Jul 2002 10:48:33 +0200


On Sun, Jul 28, 2002 at 03:37:47PM -0400, Karthik Arumugham wrote:

> I've been having an issue where when the server goes past 20k connections or
> so, it'll start ignoring syn packets on the most heavily used ports. I've
> experienced this under 2.4.18 and older 2.4 kernels, and I'm currently
> running 2.5.29. Distribution is Debian unstable (not that that should matter
> here). I'm using a Netgear GA620 gig-e card, x86 architecture.

I've had such a behaviour with an HTTP reverse proxy I wrote, until I
realized that when you have thousands of connections, the select() call
slows down a bit, and the accept() was not called often enough to catch
all the new connections. I simply solved the problem by calling as many
accept() as possible each time the listen socket wakes up. I'm pretty
sure you are in such a situation.

Cheers,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/