Uploaded image for project: 'Lucee Development'
  1. LDEV-119

Existing ORM datasource connections fail to time out after calling OrmReload()

    Details

    • Type: Bug
    • Status: Backlog
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5.1.000
    • Fix Version/s: None
    • Labels:

      Description

      Calling OrmReload() seems to cause ORM datasource connections started before the call to become "detached" and fail to time out.

      New connections created after the reload call time out correctly according to the Lucee datasource timeout setting (default=1 minute), but those started before the `OrmReload()` ignore that setting and continue until closed by the database (in MySQL/MariaDB the default is 8 hours later).

      This can lead to a build-up of unused, "detached" connections.

      Expected behaviour

      `OrmReload()` should I believe cause all existing connections to be closed, but if not then existing connections should at least respect the Lucee datasource timeout settng.

      Actual behaviour

      Existing datasource connections fail to timeout and continue until closed by the database server.

      Database

      MariaDB 10.0.x (compatible with MySQL 5.6) using bundled Lucee MySQL connector.

      Orm settings

      this.datasource = "datasource"; //single datasource
      this.ormEnabled = true;
      this.ormSettings = {
       autoManageSession=false
       ,flushAtRequestEnd=false
       ,dialect = "MySQLwithInnoDB"
      };
      

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              julianhalliwell Julian Halliwell
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: