[Twisted-Python] Twisted Consumes 100% CPU

Matthew Glubb matt at madebykite.com
Sun Feb 24 12:37:15 MST 2008


I just wanted to say thanks for your guidance regarding my epoll  
problem. I copied twisted.internet.epollreactor.py from trunk and it  
seems to be fine now.

Regards,


Matt	

Matthew Glubb
Technical Partner

email: matthew.glubb at madebykite.com
phone: 44 (0) 7715 754017
skype: mglubb

Kite
http://madebykite.com

--
GPG: 96FF DE0E 0B7B 37F0 7F8D C54C E285 3D8F 5625 9244

On 24 Feb 2008, at 14:08, Matthew Glubb wrote:

> Brilliant. Thanks Thomas. It's nice to know that it can be fixed :)
>
> Matt
> 	
>
> Matthew Glubb
> Technical Partner
>
> email: matthew.glubb at madebykite.com
> phone: 44 (0) 7715 754017
> skype: mglubb
>
> Kite
> http://madebykite.com
>
> --
> GPG: 96FF DE0E 0B7B 37F0 7F8D C54C E285 3D8F 5625 9244
>
> On 24 Feb 2008, at 11:17, Thomas Hervé wrote:
>
>> Matthew Glubb a écrit :
>>> Hi All,
>>>
>>> Hope you are all enjoying your weekends.
>>>
>>> I have a simple twisted proxy server, obviously passed on  
>>> twisted.web.proxy. Periodically, it makes a call to a MySQL  
>>> database, using adbapi.ConnectionPool.
>>>
>>> When I initially boot the server, I see traffic going through the  
>>> proxy and everything works fine, twistd consumes less than 5%  
>>> CPU. I return 24 hours later, the server is still responsive (ie.  
>>> functions fine) but it consumes 100% of the CPU.
>>>
>>> I have only noticed this behaviour since I added the db  
>>> connection via adbapi. I assume, because the proxy still  
>>> functions well that the threads in the adbapi pool are working  
>>> overtime.
>>>
>>> When I manhole in to the server, gc.collect() shows objects are  
>>> being cleaned up, and gc.garbage reports nothing.
>>>
>>> I am running Twisted 2.5, Python 2.5.1, Linux 2.6, epoll, MySQL  
>>> 5.0.51a.
>>>
>>> Does anyone have any experience of this problem? Is there an easy  
>>> workaround?
>> Unfortunately, this is a known problem with epoll on Twisted 2.5.  
>> Fortunately, this has been fixed in trunk. You can see more  
>> informations at http://twistedmatrix.com/trac/ticket/2809. There  
>> is different workaround for Twisted 2.5, either by backporting  
>> epollreactor from trunk, or applying one of the small patch proposed.
>>
>> -- 
>> Thomas
>>
>> _______________________________________________
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python





More information about the Twisted-Python mailing list