FoundationDB/sql-layer — pull request #1006 by tjoneslo (2013-10-24 20:00:24+00:00)
Title: Server connect delay

Add a process whereby the PostgresServer receiving connections slows or stops the reception if there are too many current connections to the server.

The use case for this comes from a JDBC test which generates about 470+ connections and promptly drops them in about 35 seconds. This overwhelms the ability of the system to close the connections and clean up the underlying threads. By slowing down the connections, it gives the system a chance to clean up (perhaps a little), and stops the flood before the system crashes.

I thought about trying to reserve one connection (like MySQL) for the administrator, but with the REST and (in theory) JMX interfaces it may not be as essential.