Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-605

Multiple concurrent content creation/update processes result in database deadlocks

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1. Use Redis as a cache.
      2. Add URL field of identifier url to Folder Content Type.
      3. Copy and paste the attached command file in the src/Command directory.
      4. Run the command with: php bin/console app:create-content.
      5. Observe the logs and/or terminal output.

      Result:
      You will start seeing the following exceptions:

      14:56:11 CRITICAL  [app] An exception occurred while executing 'INSERT INTO `ezurl_object_link` (contentobject_attribute_id, contentobject_attribute_version, url_id) VALUES(?, ?, ?)' with params [12764, 1, "92"]:
      
      SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
      

      Some of the contents were not created (5 processes * 100 iterations = 500 contents) in the root folder.

      Expected result:
      No exceptions. You should see 500 contents created.

      Note:
      Increasing the number of parallel processes will result in more exceptions.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: