Skip to content

Commit 9e5d366

Browse files
committed
Added doc about UV_THREADPOOL_SIZE
1 parent 4df45d7 commit 9e5d366

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/api.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,6 +1963,25 @@ A pool can be monitored by looking at the Pool attributes
19631963
[`connectionsInUse`](#proppoolconnectionsinuse) and
19641964
[`connectionsOpen`](#proppoolconnectionsopen).
19651965
1966+
Node worker threads executing database statements on a connection will
1967+
commonly wait for round-trips between node-oracledb and the database
1968+
to complete. Current Node versions have four worker threads by
1969+
default. When an application is handling a sustained number of user
1970+
requests, and database operations take some time to execute, a
1971+
limitation on thread availability may be observable. In other cases
1972+
it may be only be significant on slow networks. If your application
1973+
is affected, increasing the number of worker threads may improve
1974+
throughput. Do this by setting the environment variable
1975+
[UV_THREADPOOL_SIZE](http://docs.libuv.org/en/v1.x/threadpool.html)
1976+
before starting Node.
1977+
1978+
For example, in a Linux terminal the number of Node worker threads can
1979+
be increased to 10 by using:
1980+
1981+
```shell
1982+
UV_THREADPOOL_SIZE=10 node myapp.js
1983+
```
1984+
19661985
### <a name="drcp"></a> 8.3 Database Resident Connection Pooling (DRCP)
19671986
19681987
[Database Resident Connection Pooling](http://docs.oracle.com/database/121/ADFNS/adfns_perf_scale.htm#ADFNS228) (DRCP)

0 commit comments

Comments
 (0)