Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
When using multi-threaded plugins, sometimes a Database is locked error gets raised.
The reason for this is that each thread automatically receives a separate session from SQLAlchemy for communication with the database. This session must be closed properly before the thread terminates, or else other attempts of interacting with the database could hang (and lead to the error mentioned above).
One way to avoid this is for plugin authors to ensure they shut the session down properly for each thread the plugin creates.
Another possible solution would be to save all sessions created on the operation's ctx object, and clean them up automatically afterwards.
Attachments
Issue Links
- relates to
-
ARIA-185 NullPool logging messages appear during execution
- Closed