"ZEO.Exceptions.ClientDisconnected" should retry

Bug #143178 reported by Dieter Maurer
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Medium
Unassigned

Bug Description

When ZEO restarts, its clients get a "ClientDisconnected" exception. It is usually delivered to the Zope end users.

As "ClientDisconnected" is a transient problem, the ZPublisher should probably treat this the same as "ConflictError".

I propose to define a new exception "TransientError" and
base "ZPublisher"s retrials on this exception.

Let "ConflictError" and "ClientDisconnected" (and maybe
other transient errors) be inheriting from this exception

Revision history for this message
Toby Dickenson (htrd) wrote :

Sounds like a good idea.

Do you have any experience of retrying ClientDisconnected errors in ZPublisher? I would think that it might take a few seconds for the ZEO client to reconnect, and an immediate retry would likely fail.

Revision history for this message
Chris McDonough (chrism-plope) wrote :

Maybe instead just provide a hook to register an additional exception type and a retry policy for that exception type into a ZPublisher "retry registry". When the ZPublisher exception hook encounters one of these exceptions, it performs a retry based on the retry policy for that exception type. The policy could include the amount of time to sleep before actually doing the retry, the maximum number of retries, and so forth (there's another collector issue in here that wishes we could have a number-of-retries policy for conflicts; this would sort of be an extension to that).

Revision history for this message
Hanno Schlichting (hannosch) wrote :

This is still a very valid and good idea as far as I can tell.

Changed in zope2:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.