Bhanuprakash
02/26/2026, 2:18 PMMarvin
02/26/2026, 2:18 PMMarvin
02/26/2026, 2:22 PMcurl -s http://<your-server-host>:4200/api/admin/services | jq '.[] | select(.name=="late_runs")'
Optional quick workaround (if you need to unblock immediately)
- Manually transition stuck Late runs to Pending; workers should pick them up right away:
from prefect.client.orchestration import get_client
from prefect.server.schemas import filters, states as server_states
async def bump_late_to_pending():
async with get_client() as client:
late = await client.read_flow_runs(
flow_runs_filter=filters.FlowRunFilter(
state=filters.FlowRunFilterState(name={"any_": ["Late"]})
),
limit=1000,
)
for run in late:
try:
await client.set_flow_run_state(run.id, server_states.Pending())
print(f"Moved {run.id} to Pending")
except Exception as e:
print(f"Skip {run.id}: {e}")
import asyncio; asyncio.run(bump_late_to_pending())
A couple of sanity checks (just in case)
- Make sure the worker is connected to the correct work pool and is polling (you should see it logging “Checking for flow runs…” regularly).
- Confirm the affected deployments are assigned to the same work pool/queue that the worker is serving.
If you can share:
- Your exact Prefect version (output of prefect version)
- Whether these deployments have multiple schedules configured
I can confirm the match to the 3.6.19 fix and suggest anything else specific to your setup.Bhanuprakash
02/26/2026, 2:29 PMVersion: 3.6.4
API version: 0.8.4
Python version: 3.12.12
Git commit: d3c3ed50
Built: Fri, Nov 21, 2025 06:07 PM
OS/Arch: linux/x86_64
Profile: ephemeral
Server type: server
Pydantic version: 2.12.4
Server:
Database: postgresql
PostgreSQL version: 15.15 (Debian 15.15-1.pgdg13+1)
Integrations:
prefect-redis: 0.2.6Bhanuprakash
02/26/2026, 2:29 PMMarvin
02/26/2026, 2:30 PMMarvin
02/26/2026, 2:30 PMcurl -s http://<your-server-host>:4200/api/admin/services | jq '.[] | select(.name=="late_runs")'
- Confirm your worker is polling the correct work pool/queue.
Quick unblock (optional)
- Manually bump stuck Late runs to Pending so workers pick them up:
from prefect.client.orchestration import get_client
from prefect.server.schemas import filters, states as server_states
async def bump_late_to_pending():
async with get_client() as client:
late = await client.read_flow_runs(
flow_runs_filter=filters.FlowRunFilter(
state=filters.FlowRunFilterState(name={"any_": ["Late"]})
),
limit=1000,
)
for run in late:
try:
await client.set_flow_run_state(run.id, server_states.Pending())
print(f"Moved {run.id} to Pending")
except Exception as e:
print(f"Skip {run.id}: {e}")
import asyncio; asyncio.run(bump_late_to_pending())
Could you share:
- Your exact Prefect version (output of prefect version)
- Whether the affected deployments use multiple schedules
If you’re on < 3.6.19 and using multiple schedules (or fired a lot of schedules at once), upgrading should resolve this.Bhanuprakash
02/27/2026, 8:41 AMMarvin
02/27/2026, 8:41 AMMarvin
02/27/2026, 8:42 AMfrom prefect.client.orchestration import get_client
from prefect.server.schemas import filters, states as server_states
async def bump_late_to_pending():
async with get_client() as client:
late = await client.read_flow_runs(
flow_runs_filter=filters.FlowRunFilter(
state=filters.FlowRunFilterState(name={"any_": ["Late"]})
),
limit=1000,
)
for run in late:
try:
await client.set_flow_run_state(run.id, server_states.Pending())
print(f"Moved {run.id} to Pending")
except Exception as e:
print(f"Skip {run.id}: {e}")
import asyncio; asyncio.run(bump_late_to_pending())
- If you have very chatty schedules, consider temporarily pausing schedules, clearing backlog, then resuming.
4) Sanity checks after upgrade:
- Late-runs service healthy:
curl -s http://<your-server-host>:4200/api/admin/services | jq '.[] | select(.name=="late_runs")'
- Worker is polling the right work pool/queue and regularly logging “checking for flow runs…”
- Optional: grep API logs for “SecureFlowConcurrencySlots” or “lease” warnings; they should quiet down after upgrade.
If you can share:
- Exact Prefect version on server and workers now (output of prefect version)
- Whether the affected deployments have multiple schedules on a single deployment
I can confirm which fix applies most directly to you. But given your “degrades over days” description and “no concurrency limits anywhere,” upgrading to ≥ 3.6.19 has been the definitive fix for teams seeing this.Bhanuprakash
02/27/2026, 8:47 AMMarvin
02/27/2026, 8:47 AMMarvin
02/27/2026, 8:47 AMcurl -s http://<your-server-host>:4200/api/admin/services | jq '.[] | select(.name=="late_runs")'
If you can share your exact server and worker versions (prefect version), I can confirm whether you’re on the affected range.Bhanuprakash
02/27/2026, 10:22 AMMarvin
02/27/2026, 10:22 AMMarvin
02/27/2026, 10:23 AMprefect version) and whether the affected deployments have multiple schedules — I can confirm which fix applies most to your case.