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

let session clean up in admin interface work without grinding db to a halt

    XMLWordPrintable

Details

    Description

      As documented elsewhere, there are some php configs where gc_probability is set to 0 (notably debian).
      The eZ session table will then grow continuously over time, and when the sysadmin sees that and clicks on "clean expired sessions" in the admin interface it is too late: deleting 3M rows from a table which is in constant use does not bode well with Mysql - most likely result is a very slooow ez for a couple of hours, followed by a rollback - and the table keeps growing...

      Solution: delete the expired sessions X rows at a time, committing after every chunk (eg 1000 or 10000).

      In order to do this:

      • modify ezsession.php as per the attached file
      • add an ini settings which specifies after how many session rows a commit should happen. I'd say 10000 is a good starting point, but of course admins can tune it according to their load
      • modify module setup/session to pass the new ini param to eZSessionGarbageCollector()

      Attachments

        Activity

          People

            andre1 andre1
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: