Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.5
    • Component/s: Administration
    • Labels:
      None
    • Environment:
      Apache2/mysql5

      Courses: 291
      Users: 1750
      Role assignments: 16272
      Teachers: 148
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      33577

      Description

      The calculation of the security log takes really long (700 seconds on my production site)
      It would be nice to have a progress bar or some visual feedback of the subtasks that are performed (like the backup script)

      The same goes for loading the pages
      moodle/admin/report/security/index.php?issue=report_security_check_courserole
      moodle/admin/report/security/index.php?issue=report_security_check_riskxss

        Issue Links

          Activity

          Hide
          Koen Roggemans added a comment -

          The report_security_check_riskxss took 1392 seconds

          Show
          Koen Roggemans added a comment - The report_security_check_riskxss took 1392 seconds
          Hide
          Martin Dougiamas added a comment -

          No problem on moodle.org, it's all lightning fast, so it's not because of the user table.

          Show
          Martin Dougiamas added a comment - No problem on moodle.org, it's all lightning fast, so it's not because of the user table.
          Hide
          Koen Roggemans added a comment -

          Any extra data I can provide to help debugging this?

          Show
          Koen Roggemans added a comment - Any extra data I can provide to help debugging this?
          Hide
          Petr Škoda added a comment -

          The problem here is the number of courses, categories and number of overrides I suppose.
          The main report page should be relatively fast, I was aware that the detailed report pages may be very slow - unfortunately adding progress bar will require major changes in a way it is implemented.

          I agree we might at least tr to inform admins that the detailed reports may be very slow.

          Show
          Petr Škoda added a comment - The problem here is the number of courses, categories and number of overrides I suppose. The main report page should be relatively fast, I was aware that the detailed report pages may be very slow - unfortunately adding progress bar will require major changes in a way it is implemented. I agree we might at least tr to inform admins that the detailed reports may be very slow.
          Hide
          Koen Roggemans added a comment -

          May be an intermediate page that is shown when you click on the security log link in administration. On the page a warning and a button to start the calculation of the report...

          Show
          Koen Roggemans added a comment - May be an intermediate page that is shown when you click on the security log link in administration. On the page a warning and a button to start the calculation of the report...
          Hide
          Petr Škoda added a comment - - edited

          Intermediate page is a problem because it would require a rewrite of code logic - maybe a warning bellow the report:

          "Please note that processing of detailed reports may take a very long time."

          ?

          Show
          Petr Škoda added a comment - - edited Intermediate page is a problem because it would require a rewrite of code logic - maybe a warning bellow the report: "Please note that processing of detailed reports may take a very long time." ?
          Hide
          Petr Škoda added a comment -

          I have added a warning, I hope it will be enough
          thanks for the report

          Show
          Petr Škoda added a comment - I have added a warning, I hope it will be enough thanks for the report
          Hide
          Koen Roggemans added a comment -

          Thanks Petr, I hope with you

          Show
          Koen Roggemans added a comment - Thanks Petr, I hope with you
          Hide
          Andrea Bicciolo added a comment -

          I'm currently checking Security Overview on a production site with about 45000 users and 635 courses.

          With teh above figure the report is unusable. After 35 minutes of waiting, the myql daemon was still on 100% cpu on a dual xeon quad core.

          Show
          Andrea Bicciolo added a comment - I'm currently checking Security Overview on a production site with about 45000 users and 635 courses. With teh above figure the report is unusable. After 35 minutes of waiting, the myql daemon was still on 100% cpu on a dual xeon quad core.
          Hide
          Petr Škoda added a comment -

          I have rewritten the query and committed changes into cvs, could somebody please test it on a real large site and measure the difference?

          Show
          Petr Škoda added a comment - I have rewritten the query and committed changes into cvs, could somebody please test it on a real large site and measure the difference?
          Hide
          Ryan Smith added a comment -

          I just updated my CVS and ran it and now the script runs for about 6 seconds and displays nothing on the page except the text Security overview

          Show
          Ryan Smith added a comment - I just updated my CVS and ran it and now the script runs for about 6 seconds and displays nothing on the page except the text Security overview
          Hide
          Petr Škoda added a comment -

          hmmmm, what database?

          Show
          Petr Škoda added a comment - hmmmm, what database?
          Hide
          Ryan Smith added a comment -

          MySQL 5.0.74 Enterprise

          Show
          Ryan Smith added a comment - MySQL 5.0.74 Enterprise
          Hide
          Koen Roggemans added a comment -

          I checked before and after CVS-update
          before: 701 seconds
          after: 696 seconds.

          The warning message shows up nicely.

          Show
          Koen Roggemans added a comment - I checked before and after CVS-update before: 701 seconds after: 696 seconds. The warning message shows up nicely.
          Hide
          Petr Škoda added a comment -

          grrrrrrrrrrrrr - looks like my simulated data is not real enough for testing

          Show
          Petr Škoda added a comment - grrrrrrrrrrrrr - looks like my simulated data is not real enough for testing
          Hide
          Koen Roggemans added a comment -

          If you have something to test, just ask

          Show
          Koen Roggemans added a comment - If you have something to test, just ask
          Hide
          Petr Škoda added a comment -

          finally should be solved now, I discover similar problem in riskadmin query too, thanks Andrea for cooperation

          Show
          Petr Škoda added a comment - finally should be solved now, I discover similar problem in riskadmin query too, thanks Andrea for cooperation
          Hide
          Koen Roggemans added a comment -

          Really solved
          admin/report/security/index.php: 1,6 seconds
          /admin/report/security/index.php?issue=report_security_check_riskxss: 1,9 seconds
          admin/report/security/index.php?issue=report_security_check_courserole: 0,9 seconds

          Thanks a lot for your fix - going to deal with my security risks now ...

          Show
          Koen Roggemans added a comment - Really solved admin/report/security/index.php: 1,6 seconds /admin/report/security/index.php?issue=report_security_check_riskxss: 1,9 seconds admin/report/security/index.php?issue=report_security_check_courserole: 0,9 seconds Thanks a lot for your fix - going to deal with my security risks now ...
          Hide
          Helen Foster added a comment -

          Closing following Koen's testing and comment.

          Koen, thanks for your report, thanks for everyone's comments and Petr, thanks for fixing

          Show
          Helen Foster added a comment - Closing following Koen's testing and comment. Koen, thanks for your report, thanks for everyone's comments and Petr, thanks for fixing

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: