Skip to content
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

Sending build report for pointfreeco/isowords fails with 413 Request entity too large #2825

Closed
finestructure opened this issue Jan 11, 2024 · 4 comments · Fixed by #2826
Closed

Comments

@finestructure
Copy link
Member

https://gitlab.com/finestructure/swiftpackageindex-builder/-/jobs/5908779582

BUILD FAILURE 5.9 macosSpm
========================================
ReportResult
========================================
Resolved dependency count: 40.
Product dependency count: 16.
API request failed with status code 413
Retrying in 5.0 seconds ...
Sending build result (attempt 2)
API request failed with status code 413
Retrying in 10.0 seconds ...
Sending build result (attempt 3)
API request failed with status code 413
Retrying in 20.0 seconds ...
Sending build result (attempt 4)
API request failed with status code 413
Retrying in 40.0 seconds ...
Sending build result (attempt 5)
API request failed with status code 413
Retrying in 80.0 seconds ...
Sending build result (attempt 6)
API request failed with status code 413
Error: retryLimitExceeded(lastError: Optional("API request failed with status code 413"))
@finestructure
Copy link
Member Author

Can't reproduce the 413 when sending the same report in a test the our Vapor API directly. Looks like this is a Cloudflare limit or a limit elsewhere in the stack.

@finestructure
Copy link
Member Author

For reference, the size of the response isn't all that large at 20615 bytes.

This should be the size in the failed report, I've arrived at this number by re-running the test locally and capturing the response. The only bits in the response that are variable are the product and resolved dependencies. So it's a pretty controlled test.

@finestructure
Copy link
Member Author

No, the error is definitely being raised on our end, I can see it in the logs:

CleanShot 2024-01-11 at 12 40 27@2x

For some reason my test with the payload isn't triggering it. Perhaps the way the test is setup or perhaps it's not the same size payload.

@finestructure
Copy link
Member Author

Aaah:

By default, Vapor will limit streaming body collection to 16KB in size. You can configure this using app.routes.

The test setup must be ignoring this.

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 a pull request may close this issue.

1 participant