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

DB Deadlocks on ezcontentobject_tree when updating subnode



      From customer:
      We are currently encountering a high number of db deadlocks resulting in fatal errors, usually when publishing content. This appears to be due to the update of the subnode modified time in the ezcontentobject_tree table.

      During publishing this sometimes fails to gain a lock and results in a fatal error which is very disconcerting for editors within the system.

      Is there a way to optimize this query using an IN statement instead of multiple node_id= in the WHERE clause? My explain query showed that the current statement is affecting all table rows, whereas the IN would affect only a handful.

      This is becoming a real issue from a scalability perspective, is there any other mysql settings or changes we can make to avoid or remedy this deadlock situation?

      Attached a patch that changes multiple "OR node_id = " to "node_id IN()" using eZDB::generateSQLINStatement().

      1. ezcontentobjecttreenode.php-issue-6647.diff
        1 kB
        (inactive) Gunnstein Lye
      2. issue-16340-modified_subnode-master.diff
        3 kB
        (inactive) Gunnstein Lye

        Issue Links



            • Assignee:
              Patrick Allaert
              (inactive) Gunnstein Lye
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: