[Twisted-Python] finding out what's blocking the reactor

Maarten ter Huurne maarten at treewalker.org
Wed May 15 04:38:43 MDT 2019


On Wednesday, 15 May 2019 07:30:54 CEST Chris Withers wrote:
> On 14/05/2019 22:14, Werner Thie wrote:
> > Hi all
> > 
> > with periods of seemingly no activity the gc comes to mind.
> 
> Hmm, gc blocking the process is an interesting thought, what evidence
> would you see with gdb, etc, to show that this was the problem?

A simple way is to call gc.disable() and see if the problem goes away.

Note that gc.disable() only disables the mark-and-sweep part of garbage 
collection, which is the part that can cause the Python interpreter to 
freeze. It doesn't disable garbage collection when the refcount of an 
object reaches zero.

Bye,
		Maarten






More information about the Twisted-Python mailing list