Skip to content

UWSGI offload() skipped because of _ScopedResponse #5107

@czpython

Description

@czpython

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.13.0

Steps to Reproduce

  1. Setup a view in django to serve a file using FileResponse
  2. Look at uWSGI logs to see switches and serve strategy
  3. Because Sentry overrides wsgi handler, it'll use this ScopedResponse which doesn't have a fileno
  4. uWSGI sees this and serves the file without offload()

Expected Result

I expect a log line like

[pid: 7|app: 0|req: 1/1] 127.0.0.1 () {28 vars in 380 bytes} [Tue Nov 11 16:27:44 2025] GET /file/ => generated 605 bytes in 361 msecs via offload() (HTTP/1.1 200) 7 headers in 261 bytes (0 switches on core 0)

Actual Result

[pid: 8|app: 0|req: 1/1] 127.0.0.1 () {28 vars in 402 bytes} [Thu Nov 13 13:13:09 2025] GET /file/ => generated 605 bytes in 1157 msecs (HTTP/1.1 200) 7 headers in 261 bytes (30 switches on core 0)

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions