opengb
opengb copied to clipboard
Fix transient errors in CI due to DB connection issues
node-postgres
is repeatedly throwing this error in CI
error: Uncaught (in promise) ConnectionError: The session was terminated unexpectedly
throw new ConnectionError("The session was terminated unexpectedly");
^
at Connection.#readMessage (https://deno.land/x/[email protected]/connection/connection.ts:166:13)
at eventLoopTick (ext:core/01_core.js:166:7)
at async Connection.#sendStartupMessage (https://deno.land/x/[email protected]/connection/connection.ts:240:12)
at async Connection.#startup (https://deno.land/x/[email protected]/connection/connection.ts:369:28)
at async Connection.startup (https://deno.land/x/[email protected]/connection/connection.ts:474:11)
at async Client.connect (https://deno.land/x/[email protected]/client.ts:233:7)
What I know so far:
- It's erroring here: https://deno.land/x/[email protected]/connection/connection.ts?source=#L166
- Postgres is sending a null byte (or not sending a byte at all?)
- Postgres logs might be helpful for debugging this
- The issue is in sending the startup message