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 trying to make the code resilient to a Aurora RDS failover (which interrupts the connection to the master). I'm wrapping my await service.subscribe(plugin, REPLICATION_SLOT_NAME) in a try/catch, but when I fail over the whole process just ends:
/Users/rik/iso/Code/graph/node_modules/.pnpm/[email protected]/node_modules/eventemitter2/lib/eventemitter2.js:1053
throw arguments[1]; // Unhandled 'error' event
^
Error: Connection terminated unexpectedly
at Connection.<anonymous> (/Users/rik/iso/Code/graph/node_modules/.pnpm/[email protected]/node_modules/pg/lib/client.js:132:73)
at Object.onceWrapper (node:events:628:28)
at Connection.emit (node:events:514:28)
at Connection.emit (node:domain:489:12)
at Socket.<anonymous> (/Users/rik/iso/Code/graph/node_modules/.pnpm/[email protected]/node_modules/pg/lib/connection.js:63:12)
at Socket.emit (node:events:514:28)
at Socket.emit (node:domain:489:12)
at TCP.<anonymous> (node:net:323:12)
Node.js v18.17.1
This occurs if I use the example code in the README too.
The text was updated successfully, but these errors were encountered:
rik-iso
changed the title
Crash terminates the whole process
Connection interruption terminates the whole process, doesn't allow to be try/caught
Jul 18, 2024
i.e. handling the error somehow fixes it. I guess this is an eventemitter2 thing. Would be worth documenting as the example in the README doesn't work to retry like it implies it does.
I'm trying to make the code resilient to a Aurora RDS failover (which interrupts the connection to the master). I'm wrapping my
await service.subscribe(plugin, REPLICATION_SLOT_NAME)
in a try/catch, but when I fail over the whole process just ends:This occurs if I use the example code in the README too.
The text was updated successfully, but these errors were encountered: