Hi Juan, You could try: print reactor.__class__ This should allow you to check that the twistd command-line argument is working. Example: luke@pow:~$ twistd -noy foo.py |head -n 1 <class 'twisted.internet.selectreactor.SelectReactor'> luke@pow:~$ twistd -r poll -noy foo.py |head -n 1 <class 'twisted.internet.pollreactor.PollReactor'> luke@pow:~$ cat foo.py from twisted.internet import reactor from twisted.application import service print reactor.__class__ application = service.Application("nothing") -- Best Regards, Luke Marsden CTO, Hybrid Logic Ltd. Web: http://www.hybrid-cluster.com/ Hybrid Web Cluster - cloud web hosting Phone: +447791750420 On Thu, 2011-05-19 at 21:57 +0200, Juan Antonio Ibañez Santorum wrote:
Is there any way to check if it is using the the poll/epoll reactor?
Regards
2011/4/26 Luke Marsden <luke-lists@hybrid-logic.co.uk> 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
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python