Skip to content

task runs are no longer being persisted for distributed Prefect servers #19802

@levzem

Description

@levzem

Bug summary

We recently upgraded from Prefect 3.4.13 to 3.6.2 and we have observed that task runs no longer appear in the Prefect flow dashboard. The task run tab is completely. Upon further inspection, the task_run table in the DB no longer has any task_runs associated with tasks (it still writes task runs for running deployed flows) after the version upgrade. This means task runs are no longer being persisted to the DB.

We self-host all of our Prefect infra on GKE. We have many Prefect server replicas and host the Prefect background services separately. We are unable to reproduce the issue locally.

Upon further testing, we are able to fix the issue by either:

  1. setting Prefect server replica count 1 and running the background services in memory
  2. standing up a Redis instance

Neither option is viable for us. 1 does not scale to meet our needs and previous testing has shown that 2 does not meet our scaling needs either (due to a lack of sharding support).

This seems like a pretty serious bug as it is breaking previously supported behavior of running distributed Prefect without Redis. If this is intentional, this should warrant a major version change.

Version info

Version:              3.6.2
API version:          0.8.4
Python version:       3.12.8
Git commit:           6e305792
Built:                Fri, Nov 14, 2025 12:15 AM
OS/Arch:              darwin/arm64
Profile:              ephemeral
Server type:          unconfigured
Pydantic version:     2.10.6
Server:
  Database:           sqlite
  SQLite version:     3.47.1
Integrations:
  prefect-gcp:        0.6.11
  prefect-docker:     0.6.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions