8000 Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZEon 1.35.0 · Issue #2508 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content
Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZEon 1.35.0 #2508
Closed
@aljazkosir

Description

@aljazkosir

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:

Traceback (most recent call last):
  File "E:\projects\test\venv311\Lib\site-packages\channels\routing.py", line 62, in __call__
    return await application(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\asgi.py", line 146, in _run_asgi3
    return await self._run_app(scope, receive, send, asgi_version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\asgi.py", line 241, in _run_app
    raise exc from None
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\asgi.py", line 234, in _run_app
    return await self.app(
           ^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\django\asgi.py", line 83, in sentry_patched_asgi_handler
    return await middleware(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\asgi.py", line 146, in _run_asgi3
    return await self._run_app(scope, receive, send, asgi_version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\asgi.py", line 161, in _run_app
    raise exc from None
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\asgi.py", line 157, in _run_app
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\django\core\handlers\asgi.py", line 160, in __call__
    await self.handle(scope, receive, send)
  File "E:\projects\test\venv311\Lib\site-packages\django\core\handlers\asgi.py", line 177, in handle
    request, error_response = self.create_request(scope, body_file)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\sentry_sdk\integrations\django\asgi.py", line 104, in sentry_patched_create_request
    _ = request.body
        ^^^^^^^^^^^^
  File "E:\projects\test\venv311\Lib\site-packages\django\http\request.py", line 337, in body
    raise RequestDataTooBig(
django.core.exceptions.RequestDataTooBig: Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.
ERROR    2023-11-15 11:05:58,330 django.channels.server    75700 70060 HTTP POST /photo_gallery/2703/upload-image/ 500 [0.34, 127.0.0.1:49724]

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.

Metadata

Metadata

Assignees

Type

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0