When using on a heavily used server we have noticed that we end up with a large number of open cursors which are not closed, this leads to:
ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
We did investigate increasing the allowed open cursors, but this would just kick the can down the road a bit.
One of our Java devs suggested that Lucee doesn’t close the ResultSet or the PreparedStatement afterwards. here
I thought I’d post here for comment before filing a GitHub issue.
@Zackster flagging this one with you as its got no love so far. We are daily having to restart instances on our servers as the db connections are creating large number of cursors. We have tried setting the data sources to have a stricter max connection time (3 hours) but this hasnt helped. We cant go lower than that because we have some long running background jobs that can take that long. Right now Im investigating forcing the datasource to close the connection at the end of the request.
call ant
if %errorlevel% neq 0 exit /b %errorlevel%
set testLabels=oracle
set testFilter=
set testAdditional=C:\work\lucee-extensions\extension-jdbc-oracle\tests
set testServices=oracle
ant -buildfile="C:\work\script-runner" -DluceeVersion="light-6.0.0.328-SNAPSHOT" -Dwebroot="C:\work\lucee6\test" -Dexecute="/bootstrap-tests.cfm" -DextensionDir="C:\work\lucee-extensions\extension-jdbc-oracle\dist"
Cheers Zak, I managed to get it running yesterday and couldnt reproduce the problem, even running 50k loops of a stored proceedure
We are thinking this may be related to https://lucee.daemonite.io/t/resource-leak-in-datasourceconnectionpool-5-3-10/11853, with the cursors being a symptom of the data source connections not actually being closed, leaving the cursors open in Oracle.
Below is a graph of active datasource connections after our early morning restart. We would expect these to peak around 3PM then decrease as our service becomes less utilized, however they only ever trend upward. If we run an Oracle query to list the inactive datasource connections, we get high numbers of inactive connections that go well past the liveTime.