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

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

XMLWordPrintable

      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.

        1. callgraph.png
          249 kB
          Misha Golenkov
        2. screenshot-1.png
          70 kB
          Misha Golenkov
        3. screenshot-2.png
          87 kB
          Misha Golenkov

            Unassigned Unassigned
            mikhailgolenkov Misha Golenkov
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:

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