Node js server crashing with in five minutes or less

I have node js server running on railway.app which communicates with sql on my hosting cpanel. It crashes every 5 minutes or less without any description. Project ID: ee16d47d-b058-4c12-b035-3cf6e4426170
4 Replies
Percy
Percy17mo ago
Project ID: ee16d47d-b058-4c12-b035-3cf6e4426170
fad
fad17mo ago
Relevant log that was posted in the chit chat channel
node:events:491
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/app/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (node:events:513:28)
at Protocol._delegateError (/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Protocol.handleNetworkError (/app/node_modules/mysql/lib/protocol/Protocol.js:371:10)
at Connection._handleNetworkError (/app/node_modules/mysql/lib/Connection.js:418:18)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read',
fatal: true
}
node:events:491
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/app/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (node:events:513:28)
at Protocol._delegateError (/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Protocol.handleNetworkError (/app/node_modules/mysql/lib/protocol/Protocol.js:371:10)
at Connection._handleNetworkError (/app/node_modules/mysql/lib/Connection.js:418:18)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read',
fatal: true
}
It looks like your database provider is closing the connection to the database unexpectedly. Your app doesn't seem to know how to handle this situation causing an exception to be raised which causes the program to crash.
balwindersingh
balwindersinghOP17mo ago
GitHub
GitHub - balwinder1481/game24
Contribute to balwinder1481/game24 development by creating an account on GitHub.
Adam
Adam17mo ago
This seems like a code error to me Unfortunately if it’s not a Railway issue there’s not much we can do
Want results from more Discord servers?
Add your server