sunfuze / egg-knex

knex plugin for egg
MIT License
57 stars 15 forks source link

opening multiple inactive sessions for a given user in oracle db #30

Closed cmdomingues closed 3 years ago

cmdomingues commented 3 years ago

opening multiple inactive sessions for a given user in oracle db

sunfuze commented 3 years ago

knex.js default use conn pool to store idle connections which can reuse in querying.

cmdomingues commented 3 years ago

It didn't work, I put up to these parameters and it had no effect

min:1 max:20 // acquire promises are rejected after this many milliseconds // if a resource cannot be acquired acquireTimeoutMillis: 30000, // create operations are cancelled after this many milliseconds // if a resource cannot be acquired createTimeoutMillis: 30000, // destroy operations are awaited for at most this many milliseconds // new resources will be created after this timeout destroyTimeoutMillis: 5000, // free resouces are destroyed after this many milliseconds idleTimeoutMillis: 30000, // how often to check for idle resources to destroy reapIntervalMillis: 1000, // how long to idle after failed create before trying again createRetryIntervalMillis: 200,

sunfuze commented 3 years ago

It didn't work, I put up to these parameters and it had no effect

min:1 max:20 // acquire promises are rejected after this many milliseconds // if a resource cannot be acquired acquireTimeoutMillis: 30000, // create operations are cancelled after this many milliseconds // if a resource cannot be acquired createTimeoutMillis: 30000, // destroy operations are awaited for at most this many milliseconds // new resources will be created after this timeout destroyTimeoutMillis: 5000, // free resouces are destroyed after this many milliseconds idleTimeoutMillis: 30000, // how often to check for idle resources to destroy reapIntervalMillis: 1000, // how long to idle after failed create before trying again createRetryIntervalMillis: 200,

You can try to set min:1, max:1 make only one conn exists. If some operations blocking, may be some where transactions are not released correctly.