@@ -106,7 +106,7 @@ limitations under the License.
106
106
- 8.1.2 [ Net Service Names for Connection Strings] ( #tnsnames )
107
107
- 8.1.3 [ JDBC and Node-oracledb Connection Strings Compared] ( #notjdbc )
108
108
- 8.2 [ Connection Pooling] ( #connpooling )
109
- - 8.2.1 [ Connection Pool Monitoring] ( #connpoolmonitor )
109
+ - 8.2.1 [ Connection Pool Monitoring and Throughput ] ( #connpoolmonitor )
110
110
- 8.3 [ Database Resident Connection Pooling (DRCP)] ( #drcp )
111
111
- 8.4 [ External Authentication] ( #extauth )
112
112
9 . [ SQL Execution] ( #sqlexecution )
@@ -2051,7 +2051,7 @@ The Pool attribute [`stmtCacheSize`](#propconnstmtcachesize) can be
2051
2051
used to set the statement cache size used by connections in the pool,
2052
2052
see [Statement Caching](#stmtcache).
2053
2053
2054
- #### <a name="connpoolmonitor"></a> 8.2.1 Connection Pool Monitoring
2054
+ #### <a name="connpoolmonitor"></a> 8.2.1 Connection Pool Monitoring and Throughput
2055
2055
2056
2056
Connection pool usage can be monitored to choose the appropriate
2057
2057
connection pool settings for your workload.
@@ -2097,23 +2097,24 @@ current statistics to the console by calling:
2097
2097
pool ._logStats ();
2098
2098
` ` `
2099
2099
2100
+ ##### Number of Threads
2101
+
2100
2102
Node worker threads executing database statements on a connection will
2101
- commonly wait for round-trips between node-oracledb and the database
2102
- to complete. Current Node versions have four worker threads by
2103
- default. When an application is handling a sustained number of user
2104
- requests, and database operations take some time to execute, a
2105
- limitation on thread availability may be observable. In other cases
2106
- it may be only be significant on slow networks. If your application
2107
- is affected, increasing the number of worker threads may improve
2108
- throughput. Do this by setting the environment variable
2103
+ commonly wait until round-trips between node-oracledb and the database
2104
+ are complete. When an application handles a sustained number of user
2105
+ requests, and database operations take some time to execute or the
2106
+ network is slow, then the four default threads may all be in use.
2107
+ This prevents Node from handling more user load. Increasing the
2108
+ number of worker threads may improve throughput. Do this by setting
2109
+ the environment variable
2109
2110
[UV_THREADPOOL_SIZE](http://docs.libuv.org/en/v1.x/threadpool.html)
2110
2111
before starting Node.
2111
2112
2112
- For example, in a Linux terminal the number of Node worker threads can
2113
- be increased to 10 by using:
2113
+ For example, in a Linux terminal, the number of Node worker threads
2114
+ can be increased to 10 by using the following command :
2114
2115
2115
- ` ` ` shell
2116
- UV_THREADPOOL_SIZE = 10 node myapp .js
2116
+ ` ` `
2117
+ $ UV_THREADPOOL_SIZE = 10 node myapp .js
2117
2118
` ` `
2118
2119
2119
2120
### <a name="drcp"></a> 8.3 Database Resident Connection Pooling (DRCP)
0 commit comments