Problems with GServer not accepting connections (resolved)

This weekend I had some trouble with a GServer-based server when my
site definr.com got on the Digg front page. I found a solution, so
here’s a record for anyone else with similar problems.

After a seemingly random number of connections my GServer-based server
would stop accepting new connections, but it would still show
disconnect messages (I used server.audit = true) as connected clients
hung up. I thought there was a problem with GServer, but it turns out
that my DNS provider was stalling my machine’s reverse-IP lookup
attempts because I had thousands of clients connecting per minute
(they do it to prevent a DoS attack, I guess).

I think that part of the GServer or TCPServer implementation must
synchronize while accepting new connections, and in that synchronized
block a reverse-IP lookup happens (in BasicSocket, maybe?). So if
your DNS server is suddenly stalling your lookup requests, no more
connections can be accepted.

To fix the problem I just did:

Avoid stalling DNS server

BasicSocket.do_not_reverse_lookup = true

Hope that helps someone out there. :slight_smile: