Skip to content
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

Do I need to set the pool size and UV_THREADPOOL_SIZE in Thin mode? #1562

Closed
cjbj opened this issue May 30, 2023 · 3 comments
Closed

Do I need to set the pool size and UV_THREADPOOL_SIZE in Thin mode? #1562

cjbj opened this issue May 30, 2023 · 3 comments
Labels

Comments

@cjbj
Copy link
Member

cjbj commented May 30, 2023

I have another question about Thin mode. Previously, I was providing both DB_ORACLE_POOL_SIZE and UV_THREADPOOL_SIZE in order to maximize the connections. My understanding is Instant Client would hold a thread until a request finished.

Does it mean, I no longer need to set both DB_ORACLE_POOL_SIZE and UV_THREADPOOL_SIZE in Thin mode, and there are just normal (TCP?) requests that will be handled by libuv directly?

Originally posted by @jameschenjav in #1554 (comment)

@cjbj
Copy link
Member Author

cjbj commented May 30, 2023

You do not need to set UV_THREADPOOL_SIZE for Thin mode functionality. The Node.js internal worker threads are only used in Thick mode.

By DB_ORACLE_POOL_SIZE I assume you mean poolMax. You need to size the connection pool for your workload in both modes.

Thin mode apps might need to use smaller pools and instead 'scale out' sooner with a process manager, since the main Node.js thread will do a lot of work in Thin mode that is handled in worker threads in Thick mode. Let us know what you find.

@jameschenjav
Copy link

Thanks. That will simplify my CLI app a lot, at least I don't need to worry about setting env vars.

I use DB_ORACLE_POOL_SIZE as poolMax for my CLI tool, and for some reason I thought that's something like ORA_SDTZ in my .env file. btw, I assume ORA_SDTZ is not being used in Thin mode as well?

I haven't tried running node http server in cluster mode. Not sure how is Oracle connection pool working with fork in Thick mode? I think the Thin mode is pretty straightforward on the other hand.

@sharadraju
Copy link
Member

sharadraju commented May 30, 2023

ORA_SDTZ is an optional environment variable used to set the session time zone for the environment where your app is run. It is supported in both the Thin and Thick modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants