-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle db client errors on appview #1481
Conversation
@@ -83,3 +85,5 @@ export class Database { | |||
} | |||
|
|||
export default Database | |||
|
|||
const onClientError = (err: Error) => dbLogger.error({ err }, 'db client error') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we close the connection here? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my initial reaction too— I had a client.release(err)
in there to drop the connection from the pool and close it. But it turns out kysely also has its hands in there, and I was getting a double-release error from the pool which caused its own unhandled error 🙃 I think we should keep an eye on it, but hoping this is good enough for now with the work that the pool and kysely are also doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup yup 👍
handle db client errors on bav
* origin: (21 commits) styleguide Increase CI test matrix size (#1490) tweak author-feed rejects test syntax update test format add repost of reply, update snaps simplify query fix typos include reposted replies in posts_no_replies filter fix bad test syntax fix actor takedown tests use getActor, failing atm only include media posts by post creator Fix condition for viewing soft-deleted followers (#1485) ✨ Expose takendown profile, their follows and followers to mods (#1456) Handle revalidation (#1474) Handle db pool errors on appview (#1483) Handle db client errors on appview (#1481) v0.6.4 ✨ Allow creating moderation action with a duration (#1431) ...
handle db client errors on bav
handle db client errors on bav
…lies * origin: Increase CI test matrix size (bluesky-social#1490) Fix condition for viewing soft-deleted followers (bluesky-social#1485) ✨ Expose takendown profile, their follows and followers to mods (bluesky-social#1456) Handle revalidation (bluesky-social#1474) Handle db pool errors on appview (bluesky-social#1483) Handle db client errors on appview (bluesky-social#1481)
* origin: (21 commits) styleguide Increase CI test matrix size (bluesky-social#1490) tweak author-feed rejects test syntax update test format add repost of reply, update snaps simplify query fix typos include reposted replies in posts_no_replies filter fix bad test syntax fix actor takedown tests use getActor, failing atm only include media posts by post creator Fix condition for viewing soft-deleted followers (bluesky-social#1485) ✨ Expose takendown profile, their follows and followers to mods (bluesky-social#1456) Handle revalidation (bluesky-social#1474) Handle db pool errors on appview (bluesky-social#1483) Handle db client errors on appview (bluesky-social#1481) v0.6.4 ✨ Allow creating moderation action with a duration (bluesky-social#1431) ...
Avoids potential crash on certain kinds of connection errors on appview.