New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UV_THREADPOOL_SIZE setting for Oracle / libuv issue #4076
Comments
Tagging @atiertant per the issue template. |
@cjbj So what happens currently if user correctly sets this value in his start script, and then we override it within our code? Does that break things? Also is there any documentation for recommended values for using Oracle that we could refer to from our documentation? |
As far as I can tell from the libuv code, The node-oracledb doc about this is at Connections, Threads, and Parallelism. |
@cjbj Thank! I'll update the docs. |
@cjbj @kibertoad in our tests, if |
@atiertant I also experienced this. And the suggestion in that thread about releasing the connection doesn't help. For better debugging I replaced the tarn pool with the default oracle pool for the oracledb dialect, with explicit connection releasing whenever anything finishes. The connections would still lock up as soon as the pool exceeded the Feels to me like this is an issue with |
@aidenfoxx @atiertant You definitely need UV_THREADPOOL_SIZE set correctly - at the right place and right value. Some users have (had) it quite high to cope with code that tries constructs like |
@atiertant I think the UV_THREADPOOL_SIZE setting code should be removed. It doesn't do anything because it set after the thread pool has already started.
|
I agree that the code should be removed. I would prefer instead to limit the Happy to submit a PR for this if @kibertoad agrees? |
Environment
Knex version: GitHub master
Database + version: Oracle
OS: all
Bug
An attempt to set the libuv UV_THREADPOOL_SIZE in the code for the Oracle dialect is in
knex/lib/dialects/oracledb/index.js
Lines 18 to 26 in 80355e4
This setting (i) needs to be made before the apps threadpool is started, so this function looks to be too late. (ii) won't work on Windows for some reason known to Node.js or libuv. The environment variable needs to be set before Node.js starts, eg. in a package.json 'start' script.
Also I could quibble over
knex/CHANGELOG.md
Line 869 in 7cfb78d
I don't have a good solution - other than documentation.
The text was updated successfully, but these errors were encountered: