Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15470

Transaction errors occur when objects are published concurrently

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 4.1.3, 4.2.0
    • Fix Version/s: Customer request, Future
    • Component/s: Database related
    • Labels:
      None
    • Environment:

      Description

      This is a critical bug for any medium to high traffic eZ publish site.

      Transaction Errors occur on concurrent "Send for publish" requests.

      Concurrency level: Five requests of "Send for publish" for new objects within a second

      Description of the content class of the objects:
      Attributes:
      Text line
      Text line
      Text block
      Object relations
      Object relations

      Bug found when an average of 2 of the 5 requests "Send for publish" dies with any of the following eZ Publish transaction fatal errors:

      Fatal error: A database transaction in eZ Publish failed.

      The current execution was stopped to prevent further problems.
      You should contact the System Administrator (test@example.com) of this site.
      The current transaction ID is TRANSID-38f8d80170c61a50d3a5686eba385bb9 and has been logged.
      Please include the transaction ID and the name of the current script when contacting the system administrator.

      With different MySQL errors, here some of them:

      Query error: Lock wait timeout exceeded; try restarting transaction.
      Query: UPDATE ezcontentobject_tree SET modified_subnode=1250115397 WHERE node_id='1' OR nod e_id='5' OR node_id='12' OR node_id='1071488'

      MYSQL ERROR: Lock wait timeout exceeded; try restarting transaction
      QUERY ERROR: UPDATE ezcontentbrowserecent SET user_id=9276, node_id=140, created=1250027290, name='Testing' WHERE id='186052'

      MYSQL ERROR: Duplicate entry '9572-e4e6f9c7fd1eb1c7b9599e703de183a4' for key 'PRIMARY'
      QUERY ERROR: INSERT INTO ezurlalias_ml (id, parent, lang_mask, text, text_md5, action, action_type, link, is_alias, is_original, alias_redirects) VALUES(334975, 9572, 2, 'test1578', 'e4e6f9c7fd1eb1c7b9599e703de183a4', 'eznode:319411', 'eznode', 334975, 0, 1, 1)

      MYSQL ERROR: Lock wait timeout exceeded; try restarting transaction
      QUERY ERROR: UPDATE ezcontentobject_tree SET modified_subnode=1250028676 WHERE node_id='1' OR node_id='2' OR node_id='141' OR node_id='321006'

      Steps to reproduce

      1. In an eZPublish 4.1.3 installation create a class with the following attributes:

      Text line
      Text line
      Text block
      Object relations
      Object relations

      2. Create 5 new objects of this class (fill the attributes with some content) using the Administrator interface or an automated import script.

      3. Send for publish all objects simultaneously (you can use an automated import script) or have some co-workers send submit two browsers within a second.

      4. You will find that some of the "send for publish" requests ends with a transaction fatal error.

        Issue Links

          Activity

          Hide
          Ivo Lukač added a comment -

          Exact same problems on at least 2 sites.

          Browse recent and update modified_subnode can be hacked out easily (if not needed), but urlalias_ml duplicate entry is more difficult problem.

          Show
          Ivo Lukač added a comment - Exact same problems on at least 2 sites. Browse recent and update modified_subnode can be hacked out easily (if not needed), but urlalias_ml duplicate entry is more difficult problem.
          Hide
          Bertrand Dunogier added a comment - - edited

          This situation is now fixed by using the asynchronous publishing system introduced in eZ Publish 4.5:
          https://github.com/ezsystems/ezpublish/blob/master/doc/features/4.5/ezasynchronouspublisher.txt

          Show
          Bertrand Dunogier added a comment - - edited This situation is now fixed by using the asynchronous publishing system introduced in eZ Publish 4.5: https://github.com/ezsystems/ezpublish/blob/master/doc/features/4.5/ezasynchronouspublisher.txt
          Hide
          Geir Arne Waaler added a comment -

          Reported as fixed by new functionality in asynchronous Publishing. I move it to Closed.

          Geir Arne Waaler
          eZ Documentation

          Show
          Geir Arne Waaler added a comment - Reported as fixed by new functionality in asynchronous Publishing. I move it to Closed. Geir Arne Waaler eZ Documentation

            People

            • Assignee:
              Bertrand Dunogier
              Reporter:
              Mauricio Sánchez
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: