[Twisted-Python] 100% CPU on high opened descriptors

Luke Marsden luke-lists at hybrid-logic.co.uk
Tue Apr 26 12:08:40 MDT 2011


On Tue, 2011-04-26 at 17:42 +0200, Juan Antonio IbaƱez Santorum wrote:
> Hello!
>    I have a Linux box serving my twisted app. All works ok except
> after some days running (where I can see my CPU going to 100%). I saw
> that CPU goes 100% usage when the app reaches to 1024 opened
> descriptors (sockets).

You can also switch to using the "poll" reactor, which will allow you to
sustain more than 1024 connections.  You should still figure out what is
keeping your connections open and find a way to reap them however, as
this will just delay the problem.  As Glyph suggested an application
level "ping" may help here.

In the mean-time you can switch to the poll reactor by adding "-r poll"
to your twistd command.

-- 
Best Regards,
Luke Marsden
CTO, Hybrid Logic Ltd.

Web: http://www.hybrid-cluster.com/
Hybrid Web Cluster - cloud web hosting

Phone: +447791750420






More information about the Twisted-Python mailing list