-
-
Couldn't load subscription status.
- Fork 164
feat(server): introduce maxResultSize limit and fix pg errors handling #911
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
feat(server): introduce maxResultSize limit and fix pg errors handling #911
Conversation
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.
This will need more testing on staging, and will need close monitoring on prod deploy. But should help reduce the spikes of 5xx errors we see.
| return { data: res.rows, error: null } | ||
| } catch (error: any) { | ||
| if (error instanceof DatabaseError) { | ||
| if (error.constructor.name === 'DatabaseError') { |
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.
note
With the new error propagation, had to slightly tweak this as the instanceof wasn't properly working. Even tough the constructor was the right one, the instance kept being an Error because of the promise wrapping.
Pull Request Test Coverage Report for Build 14112748589Details
💛 - Coveralls |
25bec58 to
9d831d7
Compare
…esultsize-limit feat(server): introduce maxResultSize limit and fix pg errors handling
What kind of change does this PR introduce?
poolerQueryHandleErrorWith those changes the running server should be more robust, die less often and leverage killing the connections sooner than later.
Fixes PGMETA-45