![](https://secure.gravatar.com/avatar/3a7e70f3ef2ad1539da42afc85c8d09d.jpg?s=120&d=mm&r=g)
stephan wrote:
I do use external libs, but they are all instanced within the thread. I create a connection to a mysql dbm within each thread but that should not cause any conflicts since each thread has its seperate connection object.
Personally I suspect the request object. Unfortunately I cannot just deepcopy it and pass it to the thread.
Is there an alternative way doing this? The only way I can imagine is to do the threading later down the line which would make it harder to maintain a version that also runs within apache.
If you make _any_ calls to Twisted code, put them in a reactor.callFromThread(func). It runs the function in the main thread. But you shouldn't suspect the request object, because plain Python code won't make python simply die without error. Third party C code is almost always the culprit in stuff like that. -- Twisted | Christopher Armstrong: International Man of Twistery Radix | Release Manager, Twisted Project ---------+ http://radix.twistedmatrix.com/