You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently testing stability of my node app with kysely and getting strange behaviour when connection to my mssql database has errors.
For example when I cange my database user or password (to wrong credentials) I'm getting hundreds of connection errors:
ConnectionError: Fehler bei der Anmeldung für den Benutzer "prio".
at Login7TokenHandler.onErrorMessage (C:\Yannik\ENTWICKLUNG\pips-2024\pips-backend\node_modules\tedious\src\token\handler.ts:266:19)
at Readable.<anonymous> (C:\Yannik\ENTWICKLUNG\pips-2024\pips-backend\node_modules\tedious\src\token\token-stream-parser.ts:23:55)
at Readable.emit (node:events:514:28)
at Readable.emit (node:domain:488:12)
at addChunk (node:internal/streams/readable:545:12)
at readableAddChunkPushObjectMode (node:internal/streams/readable:521:3)
at Readable.push (node:internal/streams/readable:376:5)
at next (node:internal/streams/from:98:31)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ELOGIN'
}
Similar behaviour when I screw up my IP adress (from 192.168.21.146 to 192.168.21.1466 (I know this is bs and invalid))
ConnectionError: Failed to connect to 192.168.21.1466:1433 - getaddrinfo ENOTFOUND 192.168.21.1466
at Connection.socketError (C:\Yannik\ENTWICKLUNG\pips-2024\pips-backend\node_modules\tedious\src\connection.ts:2334:28)
at C:\Yannik\ENTWICKLUNG\pips-2024\pips-backend\node_modules\tedious\src\connection.ts:2123:37
at processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 'ESOCKET',
[cause]: Error: getaddrinfo ENOTFOUND 192.168.21.1466
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: '192.168.21.1466'
}
}
Both errors are just printed, not thrown.
This second case is unlikly (up to impossible) in production. But the first case (database user login credentials change) is possible.
It doesn't crash the app completly, but because this error repeats very often (for a single query) is freezes the application..
constsqlResultAuftragseingang=awaitdb.selectFrom("AuftragPos")// is reality here is a working query.executeTakeFirst().catch((err)=>errasError);// Guard further executionif(isError(sqlResultAuftragseingang)){// log error to console and send to clientsendError(sqlResultAuftragseingang)}
Even if the Timeout is set to a short amount of time and retries is set to zero, it seems to retry very often until the Promise from Kyselys execute() Function resolves with an error.
Expected behaviour
After timeout or on connection error the execute() promise resolves instantly with an error, without blocking a long time before resolving the promise.
Am I doing something wrong in my config or is this a bug?
Thanks!
The text was updated successfully, but these errors were encountered:
I'm currently testing stability of my node app with kysely and getting strange behaviour when connection to my mssql database has errors.
For example when I cange my database user or password (to wrong credentials) I'm getting hundreds of connection errors:
Similar behaviour when I screw up my IP adress (from 192.168.21.146 to 192.168.21.1466 (I know this is bs and invalid))
Both errors are just printed, not thrown.
This second case is unlikly (up to impossible) in production. But the first case (database user login credentials change) is possible.
It doesn't crash the app completly, but because this error repeats very often (for a single query) is freezes the application..
My config looks like following:
And my query look like following:
Even if the Timeout is set to a short amount of time and retries is set to zero, it seems to retry very often until the Promise from Kyselys
execute()
Function resolves with an error.Expected behaviour
After timeout or on connection error the
execute()
promise resolves instantly with an error, without blocking a long time before resolving the promise.Am I doing something wrong in my config or is this a bug?
Thanks!
The text was updated successfully, but these errors were encountered: