@@ -120,12 +120,12 @@ limitations under the License.
120
120
- 8.1.1 [ Easy Connect Syntax for Connection Strings] ( #easyconnect )
121
121
- 8.1.2 [ Net Service Names for Connection Strings] ( #tnsnames )
122
122
- 8.1.3 [ JDBC and Node-oracledb Connection Strings Compared] ( #notjdbc )
123
- - 8.2 [ Connection Pooling ] ( #connpooling )
124
- - 8.2.1 [ Connection Pool Size and Number of Threads ] ( #conpoolthreadpoolsize )
125
- - 8.2.2 [ Connection Pool Queue] ( #connpoolqueue )
126
- - 8.2.3 [ Connection Pool Monitoring and Throughput] ( #connpoolmonitor )
127
- - 8.3 [ Database Resident Connection Pooling (DRCP)] ( #drcp )
128
- - 8.4 [ External Authentication] ( #extauth )
123
+ - 8.2 [ Connections and Number of Threads ] ( #numberofthreads )
124
+ - 8.3 [ Connection Pooling ] ( #connpooling )
125
+ - 8.3.1 [ Connection Pool Queue] ( #connpoolqueue )
126
+ - 8.3.2 [ Connection Pool Monitoring and Throughput] ( #connpoolmonitor )
127
+ - 8.4 [ Database Resident Connection Pooling (DRCP)] ( #drcp )
128
+ - 8.5 [ External Authentication] ( #extauth )
129
129
9 . [ SQL Execution] ( #sqlexecution )
130
130
- 9.1 [ SELECT Statements] ( #select )
131
131
- 9.1.1 [ Fetching Rows] ( #fetchingrows )
@@ -679,7 +679,7 @@ This property may be overridden when [creating a connection pool](#createpool).
679
679
680
680
If you increase this value, you may want to increase the number of
681
681
threads available to node-oracledb. See
682
- [ Connection Pool Size and Number of Threads] ( #conpoolthreadpoolsize ) .
682
+ [ Connections and Number of Threads] ( #numberofthreads ) .
683
683
684
684
##### Example
685
685
@@ -2266,7 +2266,32 @@ oracledb.getConnection(
2266
2266
. . .
2267
2267
` ` `
2268
2268
2269
- ### <a name="connpooling"></a> 8.2 Connection Pooling
2269
+ ### <a name="numberofthreads"></a> 8.2 Connections and Number of Threads
2270
+
2271
+ If you use a large number of connections, such as via increasing
2272
+ [` poolMax` ](#proppoolpoolmax), you may want to also increase the
2273
+ number of threads available to node-oracledb.
2274
+
2275
+ Node worker threads executing database statements on a connection will
2276
+ commonly wait until round-trips between node-oracledb and the database
2277
+ are complete. When an application handles a sustained number of user
2278
+ requests, and database operations take some time to execute or the
2279
+ network is slow, then the four default threads may all be held in
2280
+ use. This prevents other connections from beginning work and stops
2281
+ Node from handling more user load. Increasing the number of worker
2282
+ threads may improve throughput. Do this by setting the environment
2283
+ variable
2284
+ [UV_THREADPOOL_SIZE](http://docs.libuv.org/en/v1.x/threadpool.html)
2285
+ before starting Node.
2286
+
2287
+ For example, in a Linux terminal, the number of Node worker threads
2288
+ can be increased to 10 by using the following command:
2289
+
2290
+ ` ` `
2291
+ $ UV_THREADPOOL_SIZE = 10 node myapp .js
2292
+ ` ` `
2293
+
2294
+ ### <a name="connpooling"></a> 8.3 Connection Pooling
2270
2295
2271
2296
When applications use a lot of connections for short periods, Oracle
2272
2297
recommends using a connection pool for efficiency. Each node-oracledb
@@ -2328,31 +2353,7 @@ The Pool attribute [`stmtCacheSize`](#propconnstmtcachesize) can be
2328
2353
used to set the statement cache size used by connections in the pool,
2329
2354
see [Statement Caching](#stmtcache).
2330
2355
2331
- #### <a name="conpoolthreadpoolsize"></a> 8.2.1 Connection Pool Size and Number of Threads
2332
-
2333
- If you increase [` poolMax` ](#proppoolpoolmax), you may want to
2334
- also increase the number of threads available to node-oracledb.
2335
-
2336
- Node worker threads executing database statements on a connection will
2337
- commonly wait until round-trips between node-oracledb and the database
2338
- are complete. When an application handles a sustained number of user
2339
- requests, and database operations take some time to execute or the
2340
- network is slow, then the four default threads may all be held in
2341
- use. This prevents other connections from beginning work and stops
2342
- Node from handling more user load. Increasing the number of worker
2343
- threads may improve throughput. Do this by setting the environment
2344
- variable
2345
- [UV_THREADPOOL_SIZE](http://docs.libuv.org/en/v1.x/threadpool.html)
2346
- before starting Node.
2347
-
2348
- For example, in a Linux terminal, the number of Node worker threads
2349
- can be increased to 10 by using the following command:
2350
-
2351
- ` ` `
2352
- $ UV_THREADPOOL_SIZE = 10 node myapp .js
2353
- ` ` `
2354
-
2355
- #### <a name="connpoolqueue"></a> 8.2.2 Connection Pool Queue
2356
+ #### <a name="connpoolqueue"></a> 8.3.1 Connection Pool Queue
2356
2357
2357
2358
By default when ` poolMax` has been reached (meaning all connections in
2358
2359
a pool are in use), and more
@@ -2379,7 +2380,7 @@ connection is [released](#connectionclose), and the number of
2379
2380
connections in use drops below the value of
2380
2381
[` poolMax` ](#proppoolpoolmax).
2381
2382
2382
- #### <a name="connpoolmonitor"></a> 8.2.3 Connection Pool Monitoring and Throughput
2383
+ #### <a name="connpoolmonitor"></a> 8.3.2 Connection Pool Monitoring and Throughput
2383
2384
2384
2385
Connection pool usage should be monitored to choose the appropriate
2385
2386
connection pool settings for your workload.
@@ -2465,11 +2466,11 @@ Attribute |
2465
2466
2466
2467
One related environment variable is is shown by ` _logStats ()` :
2467
2468
2468
- Environment Variable | Description
2469
- ----------------------------------------------------------- |-------------
2470
- [` process .env .UV_THREADPOOL_SIZE ` ](#conpoolthreadpoolsize ) | The number of worker threads for this process.
2469
+ Environment Variable | Description
2470
+ -----------------------------------------------------|-------------
2471
+ [` process .env .UV_THREADPOOL_SIZE ` ](#numberofthreads ) | The number of worker threads for this process.
2471
2472
2472
- ### <a name="drcp"></a> 8.3 Database Resident Connection Pooling (DRCP)
2473
+ ### <a name="drcp"></a> 8.4 Database Resident Connection Pooling (DRCP)
2473
2474
2474
2475
[Database Resident Connection Pooling](http://docs.oracle.com/database/121/ADFNS/adfns_perf_scale.htm#ADFNS228) (DRCP)
2475
2476
enables database resource sharing for applications that run in
@@ -2510,7 +2511,7 @@ Oracle white paper
2510
2511
[PHP Scalability and High Availability](http://www.oracle.com/technetwork/topics/php/php-scalability-ha-twp-128842.pdf).
2511
2512
This paper also gives more detail on configuring DRCP.
2512
2513
2513
- ### <a name="extauth"></a> 8.4 External Authentication
2514
+ ### <a name="extauth"></a> 8.5 External Authentication
2514
2515
2515
2516
External Authentication allows applications to use an external
2516
2517
password store (such as
0 commit comments