ORM DB connections

Description

We are in process to add more ORM models with other databases with the datasource="another_db" option in the models.

The problem we have seen is that when you simple do a EntityLoad of any model, lucee open N connections to the DB, with N=number of distinct datasource you have in your models.

So, if you have:

model1.cfc -> datasource1 (main datasource, without datasource option in the model)
model2.cfc -> datasource2
model3.cfc -> datasource3
model4.cfc -> datasource4

And you do:

EntityLoadByPk('model1', 1);

Lucee (in my case Tomcat), always open 4 database connections and not reuse existing ones. So if you reload the page, you have 8 DB connections and so on.

We are trying to add our historical dbs (13 models) and this issue blocks us of doing it.

Environment

None

Activity

Michael Offner 
25 June 2015 at 14:02
(edited)

@Julian (i will check, see upcoming comment in that ticket)

Julian Halliwell 
25 June 2015 at 12:50

Micha, could this be related to https://luceeserver.atlassian.net/browse/LDEV-119 where connections are also not being closed after calling OrmReload()?

Michael Offner 
25 June 2015 at 12:41

problem is the connections are hold in the HibernateSession, but lucee creates a new session with every request and does not release the old sessions!

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

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 25 June 2015 at 08:58
Updated 8 May 2020 at 19:50
Resolved 25 June 2015 at 14:30