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

Oracle cursor leaks (was: Properly close all the recordsets used in code)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not a bug
    • 1.8.2, 1.9
    • 1.7.4, 1.8.4, 1.9
    • Database SQL/XMLDB
    • None
    • Any
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      == note

      We have later found the problem to be related to a bug in the OCI8 driver.

      == end - original description follows...

      It seems that, until now, we've been relying in the PHP ability, when using not-persistent connections, to close open connections (and associated resources) per request.

      And it works more or less okey for http requests (where only "a few" recordsets are opened).

      But with more and more queries coming everyday per request, plus some batch processes (like cron, or enrol_database_sync.php or....) it's possible to raise DB limits before finishing the execution.

      So, I propose to review:

      • dmllib.php
      • any place using its own recordsets.

      ASAP, in order to close all the unclosed recordsets. It will free tons of resources, absolutely!

      (Thanks to Iñaki Arenaza by giving me a clue about this important issue, with their Oracle max_cursors problem)

      I'd apply fix for both 18_STABLE and HEAD

      Any vote/comment? I'll try to start with this tomorrow. Ciao

      Attachments

        Activity

          People

            martinlanghoff Martín Langhoff
            stronk7 Eloy Lafuente (stronk7)
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jan/08