Erik Osinga
08/12/2025, 1:17 PMMarvin
08/12/2025, 1:17 PMMarvin
08/12/2025, 1:25 PMPREFECT_LOGGING_TO_API_MAX_LOG_SIZE
(bytes per log record, default 1,000,000)
- PREFECT_LOGGING_TO_API_BATCH_SIZE
(bytes per request, default 4,000,000; must be >= max_log_size)
Set them via env vars or your Prefect profile, then restart your flow/worker so they take effect. Examples:
- With env vars
export PREFECT_LOGGING_TO_API_MAX_LOG_SIZE=2000000
export PREFECT_LOGGING_TO_API_BATCH_SIZE=6000000
- With the CLI (updates your current profile)
prefect config set PREFECT_LOGGING_TO_API_MAX_LOG_SIZE=2000000 PREFECT_LOGGING_TO_API_BATCH_SIZE=6000000
Notes:
- If you’re on Prefect Cloud, there’s also a server-side request limit; if you crank these too high you may hit a 413 response. In that case, you’ll need to keep messages smaller or split them.
- If you’re self-hosting Prefect Server and still bump into a 413, tell me how you’re deploying it and I’ll help you locate the server request-size setting.