twisted web / reactor.callInThread()
hi all, I am using reactor.callInThread(methodname, args ...) to start a function in a new thread from a twisted web application. Today i got problems with my server, and when i looked at the currently running processes there where about 50 twisted processes running, some of them where days/weeks old. I increased the Threadpoolsize previously with the command reactor.suggestThreadPoolSize(50) to 50 in order to have more parallel executions... Could it be that some of the threads didnt get terminated and cleaned up correctly, or are the processes just visible because the threadPoolSize was set as high? ...I'm almost sure my function terminates correctly... any help or information about this behaviour would be appreciated thanks Andy
On 5/21/05, Andreas De Stefani <andreas.destefani@ucd.ie> wrote:
I am using reactor.callInThread(methodname, args ...) to start a function in a new thread from a twisted web application. Today i got problems with my server, and when i looked at the currently running processes there where about 50 twisted processes running, some of them where days/weeks old.
I increased the Threadpoolsize previously with the command
reactor.suggestThreadPoolSize(50)
to 50 in order to have more parallel executions...
Could it be that some of the threads didnt get terminated and cleaned up correctly, or are the processes just visible because the threadPoolSize was set as high? ...I'm almost sure my function terminates correctly...
any help or information about this behaviour would be appreciated
Well, it is a thread _pool_, that is, it keeps a pool of threads around to do work whenever it's asked. So suggesting 50 will mean it can get as high as 50, and as low as the minimum (whatever that's set to). -- Twisted | Christopher Armstrong: International Man of Twistery Radix | -- http://radix.twistedmatrix.com | Release Manager, Twisted Project \\\V/// | -- http://twistedmatrix.com |o O| | Founding Member, Hobart Hacking Society w----v----w-+ -- http://hackingsociety.org/chapters/hash
participants (2)
-
Andreas De Stefani
-
Christopher Armstrong