Skip to content

API: blocking sync work in async handlers freezes the event loop #41

Description

@I4cTime

Summary

Several handlers are async def but do long blocking I/O directly (not via threadpool), stalling every other in-flight request - including the auth-exempt /health probe Electron polls.

Locations

Failure scenario

User triggers a save backup of a large prefix -> the whole API is unresponsive for the duration -> the UI hangs and concurrent requests (health poll, other panels) block until the zip finishes.

Fix

Make these def handlers (FastAPI runs them in the threadpool) or await run_in_threadpool(...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions