Uploaded image for project: 'AriaTosca'
  1. AriaTosca
  2. ARIA-265

Database locked errors when using multi-threaded plugins

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              ran Ran Ziv
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: