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

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" };

Environment

None

Activity

Show:

Luis Majano 8 March 2016 at 19:22

This is the same issue dealing with the stack not releasing the thread. Basically, those connections are lost and will eventually kill the database. I beleive you have addressed this, so this issue could be linked to it. As this is a side-effect of the bug.

Julian Halliwell 4 July 2015 at 16:34
Edited

I've also tested this on 4.5.1.022 using multiple ORM datasources and the same thing happens: call OrmReload() and each original connection becomes "detached".

Julian Halliwell 4 July 2015 at 15:45
Edited

Having updated to 4.5.1.022, this issue still seems to be present. LDEV 405 doesn't appear to have fixed it.

Julian Halliwell 25 June 2015 at 15:20

@Micha This was with a single datasource defined using this.datasource in application.cfc

Are you saying LDEV 405 fixes this but only with a single datasource?

Michael Offner 25 June 2015 at 14:58

do you have multiple datasources? Or defined the datasource with the "datasource" attribute in the component?
This function has only affected the default datasource, this was fixed with ticket https://luceeserver.atlassian.net/browse/LDEV-405#icft=LDEV-405

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 9 February 2015 at 11:28
Updated 11 March 2016 at 07:29

Flag notifications