@@ -165,3 +165,62 @@ and Windows 7.
165165and dataTypeDouble.js.
166166
167167- Slow networks may cause some tests to timeout.
168+
169+ ## 6. Troubleshooting
170+
171+ You may encounter some troubles when running the test suite. These troubles
172+ might be caused by the concurrency issue of Mocha framework, network latencies,
173+ or database server issues. This section gives some issues that we ever saw
174+ and our solutions.
175+
176+ ### 6.1 ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
177+
178+ This error occurs when Node.js programs try to change database objects which
179+ hold locks. The workaround would be:
180+
181+ (1) Use unique DB object names for each test to avoid interference between
182+ test files.
183+ (2) Try not to use 'beforeEach' blocks for object operations to avoid
184+ the interference between cases.
185+
186+ ### 6.2 ORA-00018: maximum number of sessions exceeded
187+
188+ This error occurs when the test suite takes up more sessions than the
189+ configured limit. You can alter the session limit on the database server side.
190+ If you do not have access to change the database session setting, you could
191+ use the below script to deliberately add an interval between tests.
192+
193+ ``` Bash
194+ arr=$( ls test/* js)
195+ for case in ${arr[@]}
196+ do
197+ var=" $NODE_PATH /../node_modules/.bin/mocha --timeout 10000 $case "
198+ eval $var
199+ sleep 1
200+ done
201+ ```
202+
203+ ### 6.3 ORA-28865: SSL connection closed
204+
205+ You may encounter this error when the test suite sends more connection
206+ requests per second than the database is configured to handle.
207+
208+ There are two solutions:
209+
210+ - Solution 1: Change database ` RATE_LIMIT ` configuration. This parameter
211+ defines the connection count allowed per second. See [ RATE_LIMIT] ( http://docs.oracle.com/database/121/NETRF/listener.htm#NETRF426 )
212+ for more information.
213+
214+ - Solution 2: Set the ` RETRY_COUNT ` and ` RETRY_DELAY ` parameters in
215+ connectString.
216+
217+ For example, below is the connectString which could be defined in
218+ ` tnsnames.ora ` file.
219+
220+ ```
221+ dbaccess = (description=(RETRY_COUNT=20)(RETRY_DELAY=3)
222+ (address=(protocol=tcps)(port=1521)(host=<db-host>))
223+ (connect_data=(service_name=<service-name>))
224+ (security=(my_wallet_directory=<wallet-location>)(ssl_server_cert_dn=<ssl-server-cert-dn>))
225+ )
226+ ```
0 commit comments