Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,15 @@ def _celery_result_backend_url(redis_url):
CELERY_BROKER_CONNECTION_MAX_RETRIES = None # Retry forever


# Allow large request bodies from ML workers posting classification results
DATA_UPLOAD_MAX_MEMORY_SIZE = 100 * 1024 * 1024 # 100MB (default 2.5MB)
# Allow large request bodies from ML workers posting classification results.
# ML detection+classification payloads for a single batch can easily exceed
# the Django default (2.5 MB) and even the previous hardcoded 100 MB ceiling.
# Configurable via env (MB) so staging and production can tune without a
# code change. See RolnickLab/antenna#1223 for the longer-term fix (worker-
# side incremental result posting).
DATA_UPLOAD_MAX_MEMORY_SIZE = (
env.int("DJANGO_DATA_UPLOAD_MAX_MEMORY_MB", default=100) * 1024 * 1024 # type: ignore[no-untyped-call]
Comment thread
mihow marked this conversation as resolved.
Outdated
)

# django-rest-framework
# -------------------------------------------------------------------------------
Expand Down
Loading