<@ULVA73B9P> these are the logs that are continous...
# ask-marvin
l
@Marvin these are the logs that are continously emitted ny these pods “event”:“HTTP Request: POST http\/\/prefect server.prefect.svc.cluster.local4200\/api\/v2\/concurrency_limits\/leases\/c58f6f48-afe9-47ba-9309-82dcd6cba1e3\/renew \“HTTP\/1.1 204 No Content\“”,“level”:“info” │ │ ,“timestamp”“2026 02 13T081418.632555Z”,“func name”“_send_single_request”,“pathname”“\/app\/.venv\/lib\/python3.13\/site packages\/httpx\/ client.py”,“filename”“_client.py”,“lineno”:1740,“prefect_flow_nam
m
thought for 366.6 seconds
Thanks for sharing the snippet — that log line is expected behavior in Prefect 3.x when a deployment has a concurrency limit. What it is - Those messages are httpx INFO logs for periodic renewals of a deployment concurrency lease: - Endpoint: POST /api/v2/concurrency_limits/leases/<lease_id>/renew - Status: 204 No Content = successful renewal - Emitter: the Python httpx client used by the Prefect worker/flow-run process (you can see httpx/_client.py in the log) - Prefect’s flow engine automatically acquires and maintains a lease when a deployment has a concurrency limit. By default it renews the lease every ~225 seconds (75% of a 300s lease window). Why you’re seeing them “continuously” - Each running flow run under a deployment with a concurrency limit keeps one lease alive and renews it on that cadence, so each pod/job will emit one of these messages roughly every few minutes. How to reduce or suppress the noise Pick the option that fits your situation: 1) If you don’t need deployment-level concurrency limits - Remove the concurrency limit from the deployment (via UI or API). Without a limit, no leases are acquired or renewed, so these httpx renewal logs stop. 2) Keep concurrency limits but silence httpx request logs - Set the httpx logger to WARNING (or ERROR) so its INFO “HTTP Request: …” lines don’t appear. You can do this in several ways: - In code (put this before your flow runs):
Copy code
import logging
    logging.getLogger("httpx").setLevel(logging.WARNING)
- With a Prefect logging config (recommended for workers/flow pods). Create a logging YAML and point Prefect to it: logging.yml
Copy code
version: 1
    disable_existing_loggers: false
    loggers:
      httpx:
        level: WARNING
        propagate: true
      prefect:
        level: ${PREFECT_LOGGING_LEVEL:-INFO}
      prefect._internal:
        level: ${PREFECT_INTERNAL_LOGGING_LEVEL:-ERROR}
    root:
      level: WARNING
      handlers: [console]
Then set:
Copy code
PREFECT_LOGGING_CONFIG_PATH=/path/to/logging.yml
(In Kubernetes, mount this via a ConfigMap and set the env var on your worker and/or flow-run containers.) - Note: By default Prefect’s root logger is WARNING, which would already hide httpx INFO logs. If you’re seeing these, something in your image or logging config is likely raising the root level to INFO—this YAML brings it back under control while keeping Prefect logs at INFO. 3) If you’re using explicit task-level leases - If you’re manually calling a concurrency/lease context with a very short lease_duration, renewals will be more frequent. Increase the lease duration in that call if appropriate to reduce the frequency of renewals. A few clarifications that may help - The renewal interval for deployment-level leases is currently fixed (renew at 75% of a 300s window). There isn’t a user-facing knob to change that interval for deployment leases. - Seeing 204 No Content is good; it means the lease renewal is succeeding. - If you’re observing renewal spam much more frequently than every few minutes, let me know — that can happen if something keeps failing and retrying or if a very short custom lease is in play. If you tell me whether these logs are coming from your worker pods or the flow-run job pods, I can share a minimal, copy/paste YAML snippet to apply the logging config in your setup.