Skip to content

Investigate potential head-of-line blocking in ShapeLogCollector for shapes with subqueries #3928

@alco

Description

@alco

Feedback from a user indicates that a shape query with a few nesting levels takes orders of magnitude longer to return than how long it takes to run the query against Postgres (5-8 seconds vs 20ms).

The Electric instance is running at 1-3% CPU utilization on 4 vCPUs with 3.8% memory utilization. The write pipeline processes each transaction in 2.6ms average (8.2ms max). The SLC publish phase takes 1.8ms average (6.3ms max).

The bottleneck is not resource exhaustion — it's architectural. The SLC processes all transactions through a single GenServer with :infinity timeout, creating head-of-line blocking proportional to active shape count and dependency layer depth.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions