[Twisted-Python] Degrading under load
itamar at itamarst.org
Thu Mar 9 16:28:25 EST 2006
On Thu, 2006-03-09 at 23:13 +0200, Yitzchak Gale wrote:
> When running listenTCP, how often does twisted
> accept pending connections on the port? Is it only
> when the previous connection is finished
> processing, or every time the event loop gets
> control, or something in between?
A TCP connection can live for a long time (e.g. ssh session for hours or
days.) The server will therefore accept connections on each iteration of
the event loop where the server socket is readable.
If processing something when data is received takes a long time though
this mean the event loop won't get control back and so accept()ing will
> And when twisted does accept pending connections,
> does it accept ALL of them and queue them all for
> processing, or just one at a time?
IIRC most reactors will try to accept as many as possible, up to some
limit in each iteration.
More information about the Twisted-Python