You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
Templates are themes table are re-initialized at application startup in a transaction that empties the database table and feeds it using the discovered files.
In a multi-process setup with (u)wsgi and lazy-apps set to true, multiple transactions may be performed in parallel during application startup. This leads to the failure and rollback of one or several of them because the first one may be in the commit stage while the other is in the processing stage.
This is not destructive as the transaction is rolled back but sqlobject.dberrors.DuplicateEntryError as well as psycopg2.errors.UniqueViolation exceptions are raised and never caught, making the app crash.
While we could logically accept such a failure and pass on sqlobject.dberrors.DuplicateEntryError, it is not sufficient to catch the sqlobject backend underlying exception (psyscopg in the case of postgre). Catching all exceptions and passing could lead to more instable behaviour (I/O erros, ...)...