tarn.js: Operation timed out for an unknown reason
I have a web app that keeps crashing with this error:
- 2020-01-23T08:07:36.485-05:00 [APP/PROC/WEB/0] [ERR] (node:134) UnhandledPromiseRejectionWarning: Error: operation timed out for an unknown reason
- 2020-01-23T08:07:36.485-05:00 [APP/PROC/WEB/0] [ERR] at /home/vcap/app/node_modules/tarn/lib/PendingOperation.js:16:27
- 2020-01-23T08:07:36.485-05:00 [APP/PROC/WEB/0] [ERR] (node:134) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 140)
Searched far and wide but can’t pinpoint the exact database call that’s triggering this. Attempts to resolve have included specifying Node version 13.5.0, increasing max pool size, updating all npm packages.
Any help is appreciated.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (1 by maintainers)
Hi, i’m facing the same issue,
this is only happening when Query is fired simultaneously and during this operation network connectivity is dropped, once network is back same error is keep on coming, until service restarted and new connection established.
to reproduce this following config :
I’m executing parallel query using prepare statement, and with pool.max is 1
@laychopy I’ve handled this issue with different approach, i’ve listen for the error event (https://github.com/tediousjs/node-mssql#connect-callback) along with Error code
ETIMEOUT
, and again retry the connection within some interval, so every time if i’ll getoperation timed out
with error code, it will keep on retry connection until success ,Here is the sample code
Hope this helps you