[ZPatterns] excessive recursion error
Phillip J. Eby
[email protected]
Mon, 02 Jul 2001 09:28:46 -0500
The problem is that the catalog is issuing a subtransaction commit, while a
transaction commit is already taking place. This commit attempt causes
ZPatterns to try to catalog the objects again, leading to another attempt
at subtransaction commit. I presume it's happening sporadically because
the catalog object has a _v_ attribute keeping count of how many things
have been cataloged, and it's not reset between transactions, so as long as
the catalog stays in cache, the count keeps going up... and so it commits
when the count gets there.
This looks like it might be two Zope bugs: first, transactions should
refuse to commit while they're already committing, and second, ZCatalog
should not maintain its subtransaction threshhold count across transactions.
At 04:08 PM 7/2/01 +0200, [email protected] wrote:
>
>Now sporadically I get this
>
><P>
> <STRONG>Error Type: SystemError</STRONG><BR>
> <STRONG>Error Value: Excessive recursion</STRONG><BR>
></P>
>
>Traceback (innermost last):
> File /usr/local/Zope-2.2.1-src/lib/python/ZPublisher/Publish.py, line
222, in publish_module
> File /usr/local/Zope-2.2.1-src/lib/python/ZPublisher/Publish.py, line
187, in publish
> File /usr/local/Zope-2.2.1-src/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
> (Object: ProviderContainer)
> File /usr/local/Zope-2.2.1-src/lib/python/ZPublisher/Publish.py, line
175, in publish
> File /usr/local/Zope-2.2.1-src/lib/python/Zope/__init__.py, line 235, in
commit
> File /usr/local/Zope-2.2.1-src/lib/python/ZODB/Transaction.py, line 251,
in commit
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line
91, in commit
> (Object: GTMixin)
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line
194, in _objectAdded
> (Object: GTMixin)
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line
240, in _notify
> (Object: GTMixin)
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Expressions.py,
line 122, in eval
> File /usr/local/Zope-2.2.1-src/lib/python/DocumentTemplate/DT_Util.py,
line 337, in eval
> (Object: Catalog . catalog_object ( self , _ . string . join ( self .
getPhysicalPath ( ) , '/' ) ))
> (Info: _)
> File <string>, line 0, in ?
> File /usr/local/Zope-2.2.1-src/lib/python/Products/ZCatalog/ZCatalog.py,
line 383, in catalog_object
> (Object: Traversable)
> File /usr/local/Zope-2.2.1-src/lib/python/ZODB/Transaction.py, line 251,
in commit
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line
91, in commit
> (Object: GTMixin)
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line
194, in _objectAdded
> (Object: GTMixin)
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py,
line 240, in _notify
> (Object: GTMixin)
> File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Expressions.py,
line 122, in eval
> File /usr/local/Zope-2.2.1-src/lib/python/DocumentTemplate/DT_Util.py,
line 337, in eval
> (Object: Catalog . catalog_object ( self , _ . string . join ( self .
getPhysicalPath ( ) , '/' ) ))
> (Info: _)
>
>and so on. Sporadically means, I could add up to 400 instances then when
>adding 400 - 800, I got this error. Then I had to restart Zope, listed the
>items -> no items were added tried again to add 400 - 800, this time
without error.
>Then added 800 - 1200, again: the same error, no items added
>Zope restartet, tried again 800 - 1200 --> no error
>tried 1200 - 1600 --> no error
>tried 1600 - 2000 --> no error
>tried 2000 - 2400 --> error
>
>Can someone explain this ?