A reference cycle is ultimately the root cause of these symptoms. tp_traverse/tp_clear needs to be implemented to prevent that. https://groups.google.com/g/python-sqlite/c/jyqYdj3vadE