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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not a bug
    • Affects Version/s: 1.8.2, 1.9
    • Fix Version/s: 1.7.4, 1.8.4, 1.9
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      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

            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/08