Details

    • Type: Sub-task
    • Status: Closed
    • Priority: 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

      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

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            koen Koen Roggemans added a comment -

            The report_security_check_riskxss took 1392 seconds

            Show
            koen Koen Roggemans added a comment - The report_security_check_riskxss took 1392 seconds
            Hide
            dougiamas 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
            dougiamas 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 Koen Roggemans added a comment -

            Any extra data I can provide to help debugging this?

            Show
            koen Koen Roggemans added a comment - Any extra data I can provide to help debugging this?
            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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 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 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda added a comment -

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

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

            Thanks Petr, I hope with you

            Show
            koen Koen Roggemans added a comment - Thanks Petr, I hope with you
            Hide
            andreabix 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
            andreabix 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            smithrn 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
            smithrn 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
            skodak Petr Skoda added a comment -

            hmmmm, what database?

            Show
            skodak Petr Skoda added a comment - hmmmm, what database?
            Hide
            smithrn Ryan Smith added a comment -

            MySQL 5.0.74 Enterprise

            Show
            smithrn Ryan Smith added a comment - MySQL 5.0.74 Enterprise
            Hide
            koen 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 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
            skodak Petr Skoda added a comment -

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

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

            If you have something to test, just ask

            Show
            koen Koen Roggemans added a comment - If you have something to test, just ask
            Hide
            skodak Petr Skoda added a comment -

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

            Show
            skodak Petr Skoda added a comment - finally should be solved now, I discover similar problem in riskadmin query too, thanks Andrea for cooperation
            Hide
            koen 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 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
            tsala 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
            tsala 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:
                  Fix Release Date:
                  13/May/09