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

First login is slow for some users after being offline for a while

    XMLWordPrintable

Details

    Description

      The issue is quite similar to MDL-59226. However, ajax calls mentioned there are different to what has been found for this issue.

      A site where it's been reported has a big number of notifications and almost all of the notifications are related to a small number of admins (automatic notifications on new users, self enrolments etc).

      The issue is happening for admin users after a few hours of being offline. First /my/ call takes about 3 minutes to load the page, but all further pages including logout/login attempts - all work fine. Then, after a few hours of not working on the site the issue is re-ocurring.

      We could profile this and core_message\api::count_unread_conversations turned out to be the cause. See profiling graph attached.

      Having this SQL we could replicate the issue directly in db (MySQL 5.7). First query takes ~3 minutes, but then results seem to be cached and the query completes almost instantly.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mikhailgolenkov Misha Golenkov
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: