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

FreeTDS needs unlimited memory_limit or report_log with hundreds of thousands of records does not work

XMLWordPrintable

    • MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MDL-49482-master
    • Hide

      These changes work with sql server 2012 and above.

      FreeTDS

      1. Set up an installation that uses the FreeTDS driver to connect to a mssql database.
      2. Add a course and log in and out with some students to create some logs.
      3. Run memory.php to create a lot of log entries. This is a CLI script so it needs to be run from the command line.
      4. Make sure that your memory_limit in php.ini is around 64M.
      5. Go to [Site administration  ► Reports  ► Logs] and get the default logs
      6. Click on one of the page links at the top of the table. Click one that is above 3000.
      7. Before, the page would only partially load. Now check that the page fully loads.

      sqlsrv driver

      1. Create a similar setup on a system that is not using FreeTDS but is connecting to an MSSQL database.
      2. Check that paging in the log report works as above.
      Show
      These changes work with sql server 2012 and above. FreeTDS Set up an installation that uses the FreeTDS driver to connect to a mssql database. Add a course and log in and out with some students to create some logs. Run memory.php to create a lot of log entries. This is a CLI script so it needs to be run from the command line. Make sure that your memory_limit in php.ini is around 64M. Go to [Site administration  ► Reports  ► Logs] and get the default logs Click on one of the page links at the top of the table. Click one that is above 3000. Before, the page would only partially load. Now check that the page fully loads. sqlsrv driver Create a similar setup on a system that is not using FreeTDS but is connecting to an MSSQL database. Check that paging in the log report works as above.

      When standard log (logstore_standard_log table) contains more than... not sure.. but between 300.000 and 700.000 records and I run report_log, setting &page param to ~more than 3000 (~1000 for Rajesh) the page just returns a white screen or it just renders the filters. It is crashing in get_events_select, but it does not matter if it is a get_recordset a get_records, if it returns an iterator, an array... It always crashes

      Setting memory_limit to unlimited "fixes" the problem, but all the other drivers just need around 32/64MB to download hundreds of thousands of records (after MDL-48595)

      I remember Eloy commenting about some db drivers not being friendly with recordsets, I understand that it is Mssql as using an oracle I could download a 100MB logs csv.

      Opening this issue in case there is any workaround this.

      I set affect versions as 2.9 but probably 2.8 and 2.7 are also affected.

      Environment:

      • FreeTDS driver
      • Sql server 2012 in a Win 7

            jkb Jakub Kania
            dmonllao David Monllaó
            Adrian Greeve Adrian Greeve
            Dan Poltawski Dan Poltawski
            Ryan Wyllie Ryan Wyllie
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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