[HELP] Connection disconnected when running query
Hello, everyone!
I am running the query to retrieve data from odbc database. It works well for first some queries, but after a while, I got following error.
Here is the connection string;
DRIVER={iSeries Access ODBC Driver};SYSTEM=???;DATABASE=???;UID=???;PWD=???
Anybody who knows how to fix this, please help me.
Thanks.
It's saying that the remote (IBM i) side disconnected. Could be a socket timeout or network blip or something. You could try enabling TCP keepalive with cwbcopwr. May need to do some investigation from the IBM i side, though I don't have any pointers for that unfortunately.
@kadler Thanks for your reply. Can I connect to odbc every time when I am running query?
I am running query on webhooks, means I can run query twice at the same time.
There's no method for connect/query/disconnect all in one, but you could do that yourself if you wanted. If you are using the Pool interface, you may want to switch away from that. ODBC also has its own connection pooling interface, below node-odbc and you may want to check if that is enabled and leading to these issues as well.