[Twisted-Python] Limiting number of concurrent client connections
exarkun at divmod.com
Tue Jun 28 11:00:59 EDT 2005
On Tue, 28 Jun 2005 09:50:49 -0500, Justin Johnson <justinjohnson at gmail.com> wrote:
>>From my experience, the problem has to do with more than just number of
>connections. I've reached the limit from spawning too many processes.
Right. You need to take into account everything that is happening in the process. Client connections you create, processes you spawn, _and_ incoming connections you accept. The below lets you limit one of these factors. A solution like the semaphore you posted (a version of which is in Twisted 2.0, btw, for those who aren't aware - twisted.internet.defer.DeferredSemaphore) would let you limit the others.
More information about the Twisted-Python