PrefectHQ
prefect
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Add bounded queue for QueueService to prevent OOM during server outages When the Prefect API server is unreachable for extended periods, the in-memory event queue in EventsWorker grows without bound, eventually causing OOM kills in long-running worker processes. This change adds: 1. A `_max_queue_size` class variable on `_QueueServiceBase` (default 0, meaning unbounded) that subclasses can override to set a queue bound. 2. A `try/except queue.Full` in `QueueService.send()` that drops items with a warning log instead of blocking or crashing. 3. A new `PREFECT_EVENTS_WORKER_QUEUE_MAX_SIZE` setting (default 10000) in a new `EventsSettings` model, which `EventsWorker` reads to configure its queue bound. 4. The `reset_for_fork()` method preserves the maxsize when recreating the queue in child processes. The change is fully backward-compatible: existing QueueService subclasses keep `_max_queue_size=0` (unbounded), and users can set the env var to 0 to restore the previous unbounded behavior. Closes #21031
zionts:fix/bounded-events-queue
18 minutes ago
Add bounded queue support to QueueService to prevent OOM Adds a `_max_queue_size` class variable to `_QueueServiceBase` (default 0 = unbounded, preserving current behavior). When set, the internal `queue.Queue` is created with that `maxsize`. If the queue is full, `QueueService.send()` drops the item with a warning instead of blocking. Adds a `PREFECT_CLIENT_EVENTS_QUEUE_MAX_SIZE` setting that `EventsWorker` reads to configure its queue bound. This prevents unbounded memory growth when the Prefect server is temporarily unreachable during long-running flows. Closes #21031
zionts:fix/bounded-events-worker-queue
25 minutes ago
Add PREFECT_CLIENT_EMIT_EVENTS setting to disable client-side event emission Adds a new `client.emit_events` boolean setting (env var `PREFECT_CLIENT_EMIT_EVENTS`) that controls whether the client emits events to the Prefect server. Defaults to `True` (no behavior change). When set to `False`, `should_emit_events()` short-circuits and returns `False` before checking API URL/key configuration, preventing any events from being created or queued. This is useful for long-running flows that don't rely on event-driven features (automations, triggers) and want to reduce memory usage from the EventsWorker queue. Closes #21030
zionts:fix/emit-events-setting
27 minutes ago
chore(deps-dev): bump the eslint group in /ui-v2 with 2 updates (#21025)
main
42 minutes ago
chore(deps): bump continuumio/miniconda3 from v25.11.1 to 26.1.1 (#21024)
main
46 minutes ago
Add on_missing_context parameter to get_run_logger() get_run_logger() raises MissingContextError when called outside a flow or task run context. This makes it unusable from threads (e.g. ThreadPoolExecutor workers) where no Prefect context exists, forcing users to monkey-patch the function or wrap every call in try/except. Add an on_missing_context parameter that controls this behavior: - "raise" (default): current behavior, fully backward compatible - "warn": return a standard prefect logger + emit debug message - "ignore": return a standard prefect logger silently This lets users write code that works both inside and outside Prefect run contexts without monkey-patching.
zionts:fix/get-run-logger-thread-fallback
1 hour ago
chore(deps): bump continuumio/miniconda3 from v25.11.1 to 26.1.1 Bumps continuumio/miniconda3 from v25.11.1 to 26.1.1. --- updated-dependencies: - dependency-name: continuumio/miniconda3 dependency-version: 26.1.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot/docker/continuumio/miniconda3-26.1.1
2 hours ago
Fix pre-commit formatting in test file Wrap long assert lines to satisfy ruff-format line length and remove unused pytest import.
zionts:fix/lease-renewal-retry-logic
2 hours ago
Active Branches
Add bounded queue support to QueueService to prevent OOM during server outages
last run
25 minutes ago
#21033
CodSpeed Performance Gauge
0%
Add PREFECT_CLIENT_EMIT_EVENTS setting to disable client-side event emission
last run
27 minutes ago
#21032
CodSpeed Performance Gauge
0%
Add on_missing_context parameter to get_run_logger()
last run
1 hour ago
#21028
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs