ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
188 stars 151 forks source link

Timeout is not working with connectionPool or non-pooled connection #966

Closed girish-jha closed 6 months ago

girish-jha commented 7 months ago

We are connecting to db2 installed on AS400 While connecting with pool or non-pool connection when we set timeout it does not work In spite of implementing the solution suggested in issue #954 the call is taking hours when downstream is having issues.

Db2 CLI details below DB2 code release "SQL11058" level identifier "0609010F". Informational tokens are "DB2 v11.5.8000.3209", "special_26260", "DYN2301190517WIN64_26260", and Fix Pack "0".

bimalkjha commented 7 months ago

@girish-jha Please share a sample test program to reproduce the issue. We would like to know that how do you set the timeout and how you calculated the time consumed? If you have a simple repro program say test.js, you can collect db2trace for this test program by executing below commands from Administrator command prompt:

set PATH=..../full/path/till/clidriver/bin;%PATH%
set LIB=..../clidriver/bin;..../clidriver/lib;%LIB%
db2trc on -f 1.trc
node test.js
db2trc off
db2trc flw 1.trc 1.flw
db2trc fmt 1.trc 1.fmt
db2trc fmt -cli 1.trc 1.cli

Use full path of clidriver in first two set commands if db2level or db2trc command is not working. zip all generated 1.* files and share here. By looking on generated trace files, we can check the delay is at client side or server side. Also, connectionTimeout is getting passed to clidriver or not. Thanks.

bimalkjha commented 7 months ago

@girish-jha Any update? If you are setting connectTimeout correctly, we can see in db2trace file its value and it is getting sent to server or not. Thanks.