Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-2030

Garbage Collector produces DB DeadLocks due wrong timezone configuration

    XMLWordPrintable

Details

    Description

      problem

      By default the garbage collector runs every 15 minutes triggered by each request to translate5. (This can be changed to a cron job based trigger by calling https://$

      {URL}

      /editor/cron/periodical via wget in cron).

      In the request based way the last GC call is saved with a timetamp to the Zf_memcache table.

      Here comes the problem: On memcache creation the MySQL now() function was used (with the MySQL configured timezone) and for deletion of memcache entries the PHP now() function was used with the PHP timezone.

      Since the MySQL timezone was set to GMT and the PHP ones to MEZ, the memcache entry was directly deleted after creation since it was two hours old.

      Solution

      1. Use at both code places the same technique
      2. Set the timezones of mysql accordingly to the PHP ones (for example https://www.sitepoint.com/synchronize-php-mysql-timezone-configuration/)
      3. Ensure that both timezones are synchronised by a fix in the install-and-update script

      Attachments

        Activity

          People

            tlauria Thomas Lauria
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: