Wappler Version: W7B16
Operating System: W11Pro
Server Model: NodeJS
[nodemon] starting `node ./index.js`
App listening at http://localhost:3000
[ioredis] Unhandled error event: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Error: delete from "sessions" where expired < CAST($1 as timestamp with time zone) - Connection terminated unexpectedly
at Connection.<anonymous> (D:\project\node_modules\pg\lib\client.js:131:73)
at Object.onceWrapper (node:events:632:28)
at Connection.emit (node:events:518:28)
at Socket.<anonymous> (D:\project\node_modules\pg\lib\connection.js:62:12)
at Socket.emit (node:events:530:35)
at TCP.<anonymous> (node:net:337:12)
Connection Error: Connection ended unexpectedly
[ioredis] Unhandled error event: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Connection Error: Connection ended unexpectedly
The NodeJS app crashes with errors like above randomly. Sometimes while I am working in Wappler, sometimes when I am not. I think it could be because of network changes.. I enable/disable VPN connection few times as I work on multiple things.
Maybe there needs to be a better exception/network-changes handling?
A reconnect strategy is indeed a good thing to have. Another thing is that nodemon in doesn't restart the server on a crash, it is nice that it reloads on file changes but crashes will just freeze it until you update some file.
Redis is remote, but its not dependent on VPN. It can work with VPN on/off.
After crash, the server does not restart even after saving a file. I have to manually restart the server.
Hi @patrick
Any update on this?
I still frequently see this happening in Beta 17, and even when there is no network change. There is no error in such cases. When there is a network change, the error usually is from redis package.
Was on a client call and hadn't changed network, nor made any changes in Wappler. Wappler was just open in the background.
Coming back to Wappler post call, I see this. There are two instances of redis connection errors.. but no log after that, and the app is in crashed state.
The new redis fix would have worked when redis threw an exception, but the underlying problem still remains.