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

Cleaning old sessions from cache not working ( and raise warnings if no sessions found)

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-75864-403
    • MDL-75864-404
    • MDL-75864-main
    • Hide

      Setup

      • If you haven't installed the Redis. Please use docker with the below command:

        docker run --name redis -p 6379:6379 -d redis:alpine

      • Navigate to Site Admin >> Server >> Session handling, set the below config:
        • sessiontimeout to 2 minutes
        • sessiontimeoutwarning to 1 minutes.

      1. Testing with the file store:

      1. Login as admin
      2. Navigate to Site Admin >> Plugins >> Caching >> Configuration
      3. Click the "Edit Mappings" link at the bottom of the page.
      4. Set the Session with the "Default file store for application caches" option.
      5. Save changes.
      6. Navigate to My courses page.
      7. Click the kebab icon at the right of the My Courses header.
      8. Select the Manage Courses.
      9. Add the Calendar block to the Course Management page.
      10. Wait for 2 minutes or more. If you see a popup to extend the session and re-login on the browser, just leave it.
      11. While waiting, open your favorite terminal
      12. Go to your Moodle web directory
      13. If the time has passed 2 minutes, run the below command

        php admin/cli/scheduled_task.php --execute='\core\task\cache_cron_task'

      14. VERIFY the task should have trace messages like:

        Removed 2 old core/calendar_categories sessions from the 'default_application' cache store.

      2. Testing with Redis

      1. Run the Redis docker
      2. Navigate to Site Admin >> Plugins >> Caching >> Configuration
      3. Add Redis instance
      4. Specify the Store name with "Redis store"
      5. Specify the Server(s) with "127.0.0.1"
      6. Save changes.
      7. On the Cache configuration page. Click the "Edit Mappings" link at the bottom of the page.
      8. Set the Session with the "Redis store" option.
      9. Save changes
      10. Repeat the first testing (Testing with the file store), start from step 6. But, you can skip the adding calendar block step because it already exist from the previous manual testing.

      If all the testing is complete, please go to the site admin and set the sessiontimeout and the sessiontimeoutwarning to the default value.

      Show
      Setup If you haven't installed the Redis. Please use docker with the below command: docker run --name redis -p 6379 : 6379 -d redis:alpine Navigate to Site Admin >> Server >> Session handling, set the below config: sessiontimeout to 2 minutes sessiontimeoutwarning to 1 minutes. 1. Testing with the file store: Login as admin Navigate to Site Admin >> Plugins >> Caching >> Configuration Click the "Edit Mappings" link at the bottom of the page. Set the Session with the "Default file store for application caches" option. Save changes. Navigate to My courses page. Click the kebab icon at the right of the My Courses header. Select the Manage Courses. Add the Calendar block to the Course Management page. Wait for 2 minutes or more. If you see a popup to extend the session and re-login on the browser, just leave it. While waiting, open your favorite terminal Go to your Moodle web directory If the time has passed 2 minutes, run the below command php admin/cli/scheduled_task.php --execute= '\core\task\cache_cron_task' VERIFY the task should have trace messages like: Removed 2 old core/calendar_categories sessions from the 'default_application' cache store. 2. Testing with Redis Run the Redis docker Navigate to Site Admin >> Plugins >> Caching >> Configuration Add Redis instance Specify the Store name with "Redis store" Specify the Server(s) with "127.0.0.1" Save changes. On the Cache configuration page. Click the "Edit Mappings" link at the bottom of the page. Set the Session with the "Redis store" option. Save changes Repeat the first testing (Testing with the file store), start from step 6. But, you can skip the adding calendar block step because it already exist from the previous manual testing. If all the testing is complete, please go to the site admin and set the sessiontimeout and the sessiontimeoutwarning to the default value.
    • 6
    • Team Hedgehog 2024 Sprint 2.2

      It seems to be rare to occurs but it can occurs, specially on our development and pre-production platforms.

      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      PHP Warning: Invalid argument supplied for foreach() in /var/www/cache/classes/helper.php on line 743
      

            meirza.arson@moodle.com Meirza
            rlemaire Renaud Lemaire
            Huong Nguyen Huong Nguyen
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours, 11 minutes
                2d 5h 11m

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