# Problems with GServer not accepting connections (resolved)

**URL:** <https://www.ruby-forum.com/t/problems-with-gserver-not-accepting-connections-resolved/121299>\
**Category:** Ruby\
**Created:** [November 26, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/problems-with-gserver-not-accepting-connections-resolved/121299 "2007-11-26T17:23:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_von\_Kleis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b5a626/32.png) [@Christian\_von\_Kleis](https://www.ruby-forum.com/u/Christian_von_Kleis)\
**Post date:** [November 26, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/problems-with-gserver-not-accepting-connections-resolved/121299/1 "2007-11-26T17:23:30Z")

</div>

This weekend I had some trouble with a GServer-based server when my  
site [definr.com](http://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. 🙂
