node-jdbc
node-jdbc copied to clipboard
Potential issue with maxidle property
Hi, I started using maxidle property to close connections that are not used in last 1 second. However I noticed that when my query takes more than 1 second to execute, the connection gets closed before completing the query execution. I am using this to connect to a apache phoenix database and it is recommended to use a fresh connection for every request. Since this module has Pool by default, I am trying to use maxidle as a workaround to create fresh connection. Is there a way to check if the connection is being used before closing it ? ( or can I use this module to create fresh connection every time and close it without using Pool?)