Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51365

Session TTL set arbitrarily high

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 2.9.1
    • General
    • None
    • MOODLE_29_STABLE

      This came up in the dev chat with jrchamp.

      In the session live, session.gc_maxlifetime is (seemingly arbitrarily) set to 4 days:
      https://github.com/moodle/moodle/blob/master/lib/classes/session/manager.php#L256

      This means a few things:

      • You (probably) store sessions for way longer than needed
      • You can't set session timeout to move that 4 days (not that you are likely too...)
      • You can't tell when using sessions like memcache(d) if you have enough memory allotted.
        • Normally you could watch for evictions, and if you have them, you don't have enough memory, but if you have 2 hr sessions, you have 94 hours of bad sessions that may be evicted.

      Looking back at the session rework in MDL-31501, the previous code set session.gc_maxlifetime to sessiontimeout, but when the code was updated, it was just changed to 4 days.

      I understand the theory that we want Moodle session cleanup to take precedence. Personally I would set it to "sessiontimeout + 1hr" or something like that.

            emerrill Eric Merrill
            emerrill Eric Merrill
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.