Skip to content

fix(server): bump bodyLimit to 3MB default allow parameterize #958

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

Merged

Conversation

avallete
Copy link
Member

What kind of change does this PR introduce?

  • Introduce PG_META_MAX_BODY_LIMIT_MB env variable to make easier parameterization
  • Bump the default bodyLimit value from 1MB to 3MB.

@avallete avallete requested review from a team as code owners July 22, 2025 10:12
@avallete avallete requested a review from soedirgo July 22, 2025 10:14
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16441335951

Details

  • 9 of 10 (90.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 76.119%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/server/constants.ts 2 3 66.67%
Totals Coverage Status
Change from base Build 16233676980: 0.002%
Covered Lines: 5186
Relevant Lines: 6728

💛 - Coveralls

@soedirgo
Copy link
Member

What’s the context around parameterization?

@avallete
Copy link
Member Author

What’s the context around parameterization?

Just a way to bump it up without needing a new release if we see that some of dashboard crafted queries still fail. Went with the 3MB default based on the few sampling I've made, but it might require further tweaking down the line.

@soedirgo
Copy link
Member

Can you share the full context? Which dashboard queries were failing? Have they always failed or was this a recent issue?

Copy link
Member Author

Sure ! Sorry I though linear would automatically attach the issue with the PR, more context can be found here: PGMETA-60

The issue was there for a while even if in low volume (~1.2k/90 days according to sentry). I don't get the exact query that fail on the traces, but I can see that some of those events have the x-pg-application-header set to supabase/dashboard which indicate that's a query that we forge (the ones from the users are marked with supbase/dashboard-query-editor).

@soedirgo
Copy link
Member

Gotcha thanks! Lgtm

@avallete avallete merged commit 93f0a80 into master Jul 23, 2025
5 checks passed
@avallete avallete deleted the avallete/pgmeta-60-fastifyerror-request-body-is-too-large branch July 23, 2025 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants