Closed Andrija-Markovic closed 9 months ago
You have not provided the pool parameters like poolMin, poolMax, poolIncrement. You poolMax should not exceed SESSION_PER_USER value.
poolMax
value by default is 4 (which is less than SESSION_PER_USER
limit), yet the error is happening. So, I am not convinced that setting poolMax
to 10 would change anything.
@Andrija-Markovic, Can you please confirm with 6.1.0 node-oracledb version , It may be similar to this issue
@sudarshan12s I updated to v6.1.0 and the issue seems to have gone away. I've been also monitoring pool.connectionsOpen
and pool.connectionsInUse
and they are all not exceeding poolMax
value. Thanks for the suggestion. I will close the issue now.
Oracle DB Version: "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.19.0.0.0" Nodejs Version: 16.4.0 OracleDB.versionString: 6.0.2 OracleDB.oracleClientVersionString: could not get it because I am running in Thin mode process.platform: win32 process.version: v16.4.0 process.arch: x64
package.json dependencies: "oracledb": "^6.0.2", "@types/oracledb": "^5.3.1",
Application Setup
I have an Expressjs app written in TypeScript running on Node. The application connects to an Oracle DB solely to read data from it. This is how the app creates the connection pool:
When a connection is needed the app does:
And it also releases the connection when no longer needed by doing:
Problem Description
I performed load testing, and a lot of requests came back with error:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit
. I worked with a DBA to get the information on how many sessions theconfig.DB_USER
can have and the answer is 10.So, how do I configure
node-oracledb
so that thisSESSION_PER_USER
limit is followed?