-
Notifications
You must be signed in to change notification settings - Fork 462
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
Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZEon 1.35.0 #2508
Comments
Hey @aljazkosir, thank you for reporting this. This indeed looks like a regression introduced in 1.35.0, so please stay on 1.34 until we fix this. |
Hey @aljazkosir ! Just to double check, you have Django with Channels and run in on Daphne (or another ASGI server) right? |
Oh, and what is your |
Hey @aljazkosir I just created a demo application. With 1.35.0 I get the error you mentioned. But only when the uploaded file size is over the default limit. But I also could verify that with 1.34.0 the error does not appear. The cause for the problem is that in ASGI you can not read the body multiple times, so Sentry tries to read the body in any case so Django caches it. This enables your code to read the body and Sentry to read the body to attach it to exceptions. But I guess I have to change my code that the body is only read when absolutely necessary to not trigger Djangos DATA_UPLOAD_MAX_MEMORY_SIZE check. |
Django with channels on Daphe. DATA_UPLOAD_MAX_MEMORY_SIZE is default which is 2.5MB I think. File I tried to upload was 6MB. However it seems to work for smaller files on this release aswell. |
Thanks for the info! Note to self: |
This bug wreaks havoc through our system on every file upload. Sending 🍰 to customers as we speak. |
@jberends Sorry to hear that, and thanks for the additional information. |
no worries. These things happen. |
How do you use Sentry?
self hosted
Version
1.35.0
Steps to Reproduce
When uploading files through Django I get the following error on 1.35.0:
I'm using sentry replay integration. Error was reported to sentry and it seems to be originating from
sentry_sdk.integrations.asgi.SentryAsgiMiddleware
.It works on 1.34.0 though.
Expected Result
File to be uploaded
Actual Result
Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE error is thrown.
The text was updated successfully, but these errors were encountered: