"Error: Connection terminated unexpectedly
at Connection. (node_modules\pg\lib\client.js:132:73)
at Object.onceWrapper (node:events:627:28)
at Connection.emit (node:events:513:28)
at Socket. (node_modules\pg\lib\connection.js:62:12)
at Socket.emit (node:events:525:35)
at TCP. (node:net:757:14)
Emitted 'error' event on Client instance at:
at Client._handleErrorEvent (node_modules\pg\lib\client.js:332:10)
at Connection. (node_modules\pg\lib\client.js:150:16)
at Object.onceWrapper (node:events:627:28)
[... lines matching original stack trace ...]
at TCP. (node:net:757:14)"
Keep getting this error that randomly crashes the app. I've tried using many different postgres databases but they all end up crashing with this error.
Is there a way to auto reconnect when this occurs?
"Error: Connection terminated unexpectedly at Connection. (node_modules\pg\lib\client.js:132:73)
at Object.onceWrapper (node:events:627:28)
at Connection.emit (node:events:513:28)
at Socket. (node_modules\pg\lib\connection.js:62:12)
at Socket.emit (node:events:525:35)
at TCP. (node:net:757:14)
Emitted 'error' event on Client instance at:
at Client._handleErrorEvent (node_modules\pg\lib\client.js:332:10)
at Connection. (node_modules\pg\lib\client.js:150:16)
at Object.onceWrapper (node:events:627:28)
[... lines matching original stack trace ...]
at TCP. (node:net:757:14)"
Keep getting this error that randomly crashes the app. I've tried using many different postgres databases but they all end up crashing with this error.
Is there a way to auto reconnect when this occurs?