denodrivers / denodrivers/postgres

BrokenPipe: Broken pipe (os error 32) not handled in reconnect logic

Open
#436 10 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
655
Forks
97
PR merge metrics
No merged PRs in 30d

Description

I'm currently getting a crash sometimes when connecting to a remote database.

```
BrokenPipe: Broken pipe (os error 32)
at write (ext:deno_net/01_net.js:34:21)
at TcpConn.write (ext:deno_net/01_net.js:97:12)
at BufWriter.flush (https://deno.land/std@0.160.0/io/buffer.ts:745:40)
at Connection.#preparedQuery (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:864:27)
at eventLoopTick (ext:core/01_core.js:183:11)
at async Connection.query (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:951:16)
at async Client.#executeQuery (https://deno.land/x/postgres@v0.17.0/client.ts:245:12)
at async Client.queryObject (https://deno.land/x/postgres@v0.17.0/client.ts:433:12)
at async Db.executeSql (file:///src/_shared/queue/db.ts:7:20)
at async Manager.createJob (file:///src/_shared/packages/pg-boss/manager.js:490:20)
```

Seems like there's a check for connection errors that will reconnect, but not broken pipe errors.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.