Is there an existing issue for this?
What happened?
The shared axios client applies a hard 10-second timeout to every backend request (frontend/src/api/axiosConfig.ts:7 → timeout: 10000; the sync client at :15 too), with no per-request override anywhere in frontend/src (verified by grep).
Several backend endpoints are synchronous and scale with library size, so on a realistic library they run past 10s. The client aborts with a timeout/network error and shows a failure to the user — even though the backend keeps running to completion — which can leave the UI and DB inconsistent.
Affected calls (all use the 10s apiClient):
triggerGlobalReclustering → POST /face-clusters/global-recluster (frontend/src/api/api-functions/face_clusters.ts:78). Backend runs full DBSCAN over all embeddings + regenerates a face image per cluster.
generateMemories → POST /api/memories/generate (frontend/src/api/api-functions/memories.ts:73). Clusters every image with location data.
getTimeline / getLocations, fetchSearchedFaces, fetchMultiPersonSearch — same client, can exceed 10s on large libraries.
Steps to reproduce:
- Add folders with a few thousand photos; enable AI tagging and let faces populate.
- Trigger Recluster faces (or Memories → Generate).
- Request fails after ~10s in the UI; backend logs show it still working.
Expected: long operations either run without an artificial 10s cap, or run asynchronously with progress.
Proposed fix:
- Short term: remove the global 10s default (or raise it substantially) and set conservative per-call timeouts only where they make sense.
- Better: convert
global-recluster and memories/generate to an async job + polling/SSE, reusing the existing model-download SSE pattern in backend/app/routes/models.py.
Not a duplicate: searched all issues (title + body) and all PRs for timeout/axios; only matches are SQLite busy_timeout work (PR #866/#982), unrelated to the HTTP client.
Record
Is there an existing issue for this?
What happened?
The shared axios client applies a hard 10-second timeout to every backend request (
frontend/src/api/axiosConfig.ts:7→timeout: 10000; the sync client at:15too), with no per-request override anywhere infrontend/src(verified by grep).Several backend endpoints are synchronous and scale with library size, so on a realistic library they run past 10s. The client aborts with a timeout/network error and shows a failure to the user — even though the backend keeps running to completion — which can leave the UI and DB inconsistent.
Affected calls (all use the 10s
apiClient):triggerGlobalReclustering→POST /face-clusters/global-recluster(frontend/src/api/api-functions/face_clusters.ts:78). Backend runs full DBSCAN over all embeddings + regenerates a face image per cluster.generateMemories→POST /api/memories/generate(frontend/src/api/api-functions/memories.ts:73). Clusters every image with location data.getTimeline/getLocations,fetchSearchedFaces,fetchMultiPersonSearch— same client, can exceed 10s on large libraries.Steps to reproduce:
Expected: long operations either run without an artificial 10s cap, or run asynchronously with progress.
Proposed fix:
global-reclusterandmemories/generateto an async job + polling/SSE, reusing the existing model-download SSE pattern inbackend/app/routes/models.py.Not a duplicate: searched all issues (title + body) and all PRs for
timeout/axios; only matches are SQLitebusy_timeoutwork (PR #866/#982), unrelated to the HTTP client.Record