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

Infinite loop on transaction when mysql is gone away

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 4.0.7, 4.1.4, 4.2.0, 4.3.0, 4.4.0, 4.5.0alpha, 4.5.0beta1, 4.5.0beta2
    • Fix Version/s: Customer request
    • Component/s: Database related
    • Labels:
      None
    • Environment:

      eZ 4.4, php 5.3, cluster DFS with DB1 and DB2 (server/slave) and DB3 cluster, mysqli

      Description

      From customer:
      -----------------------------------------
      We have just upgraded eZ to 4.4 and php to 5.3 yesterday. But the system is not stable, our pages show very often, a Fatal error due to Memory Limit:

      PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 523800 bytes) in
      lib/ezutils/classes/ezdebug.php on line 414 or 885 for example

      After some first debug, I can say the bug doesn't really come from the logging.
      eZ is looping on an error 'MySQL is gone away' like this (20s generate 200Mb of logs)

      )'eZDBInterface::commit TRANSID-3e498e3dd076bd61b57d13ec4f82ea48:
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-3e498e3dd076bd61b57d13ec4f82ea48.'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      )'eZMySQLiDB:
      Query error (2006): MySQL server has gone away. Query: ROLLBACK'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      )'eZMySQLiDB:
      Query error (2006): MySQL server has gone away. Query: ROLLBACK'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      )'eZDBInterface::commit TRANSID-23838038ada2d2dffe30ffb9595bf325:
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-23838038ada2d2dffe30ffb9595bf325.'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      )'eZDBInterface::commit TRANSID-1bb19138a2e1e5a5cd54d63c368deb44:
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-1bb19138a2e1e5a5cd54d63c368deb44.'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      )'eZMySQLiDB:
      Query error (2006): MySQL server has gone away. Query: ROLLBACK'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      )'eZMySQLiDB:
      Query error (2006): MySQL server has gone away. Query: ROLLBACK'truearray (
      0 => 'var/log/',
      1 => 'error.log',
      -----------------------------------------
      I have attached a patch for mysql and mysqli. Unknown if other databases are affected.

      Steps to reproduce

      Confirmed on git master. See attached test script for reproducing.

      1. issue-8915-master.diff
        0.9 kB
        (inactive) Gunnstein Lye
      2. issue-8915-test.php
        0.6 kB
        (inactive) Gunnstein Lye

        Issue Links

          Activity

          Hide
          (inactive) Gunnstein Lye added a comment -

          issue-8915-test.php Script for reproducing the problem

          Show
          (inactive) Gunnstein Lye added a comment - issue-8915-test.php Script for reproducing the problem
          Hide
          (inactive) Gunnstein Lye added a comment -

          issue-8915-master.diff Patch for git master

          Show
          (inactive) Gunnstein Lye added a comment - issue-8915-master.diff Patch for git master
          Hide
          Damien Pobel (eZ) added a comment -
          Show
          Damien Pobel (eZ) added a comment - Fixed in ezpublish master : https://github.com/ezsystems/ezpublish/commit/5c8656a
          Hide
          Geir Arne Waaler added a comment -

          The issue is fixed. I hence move it from Code Review to Closed.

          Geir Arne Waaler
          eZ Documentation

          Show
          Geir Arne Waaler added a comment - The issue is fixed. I hence move it from Code Review to Closed. Geir Arne Waaler eZ Documentation

            People

            • Assignee:
              Damien Pobel (eZ)
              Reporter:
              (inactive) Gunnstein Lye
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: