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

recentsessionlocks debugging clashes with readonly sessions

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_39_STABLE
    • MDL-68983-recent-session-lock-ro-MOODLE_39_STABLE
    • MDL-68983-recent-session-lock-ro
    • Hide

      1) Configure readonly sessions:

      $CFG->enable_read_only_sessions = true;

      2) As part of this you will need to configure MUC to store session caches in a place outside the session, ie make the default Session store 'file'. E.g.

      • Go to admin > plugins > caching > configuration and scroll to the bottom.
      • Click 'edit mappings'
      • Change sesssion to 'default file store for application caches'

      3) Also configure session lock debugging:

      $CFG->debugsessionlock = 100;

      4) Tail the error logs in a new terminal window:

      sudo tail -f /var/log/apache2/error.log 

      5) Visit the dashboard and some other random pages to fill the recent session lock list

      6) copy attached php file MDL-68983-recentsessionlocks.php to your site root and visit /MDL-68983-recentsessionlocks.php

      7) Confirm there are NOT any errors in the logs like this:

      The following SESSION params were either added, or were updated.
      SESSION key: recentsessionlocks

       

       

      Show
      1) Configure readonly sessions: $CFG->enable_read_only_sessions = true; 2) As part of this you will need to configure MUC to store session caches in a place outside the session, ie make the default Session store 'file'. E.g. Go to admin > plugins > caching > configuration and scroll to the bottom. Click 'edit mappings' Change sesssion to 'default file store for application caches' 3) Also configure session lock debugging: $CFG->debugsessionlock = 100; 4) Tail the error logs in a new terminal window: sudo tail -f /var/log/apache2/error.log 5) Visit the dashboard and some other random pages to fill the recent session lock list 6) copy attached php file  MDL-68983 -recentsessionlocks.php to your site root and visit / MDL-68983 -recentsessionlocks.php 7) Confirm there are NOT any errors in the logs like this: The following SESSION params were either added, or were updated. SESSION key: recentsessionlocks    

    Description

      Error logs:

      This session was started as a read-only session but writes have been detected.#012PHP message: The following SESSION params were either added, or were updated.#012PHP message: SESSION key: recentsessionlocks"

      If readonly sessions is on, then the recentsessionlocks debugging is moot as we don't even have a lock. It should just not run at all

      Attachments

        Issue Links

          Activity

            People

              brendanheywood Brendan Heywood
              brendanheywood Brendan Heywood
              Dmitrii Metelkin Dmitrii Metelkin
              Jake Dallimore Jake Dallimore
              Anna Carissa Sadia Anna Carissa Sadia
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/20

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h