On-demand AI summaries intermittently time out after 15 seconds in Protect 7.3.74

Open
#151 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker-compose, ollama, python

Research direction

Start by locating the Keystone on-demand job path that emits Job on_demand failed, TimeoutError, and the admission log entry. Trace how the 15-second deadline is passed and how queueing, Ollama inference, and response delivery are timed, then reproduce the issue with Protect while other detections are processing. Done means diagnostics record the requested deadline and elapsed time for each phase, making it clear whether the timeout comes from queueing, inference, or returning the summary.

Written by the indexing model from the issue text.

Description

accepted

In Protect 7.3.74, I requested four AI summaries from the event player across three cameras. Three showed “Processing” and then an error. In each case, Keystone logged Job on_demand failed with TimeoutError almost exactly 15 seconds after admitting the job. One request succeeded in 8.6 seconds.

How to reproduce

  1. In the Protect web app, open Find Anything → All Detections and select a recorded detection.
  2. Click the AI Summary button in the event player.
  3. Repeat on several clips while Keystone is processing live detections. I expected the summary to appear. The failure was intermittent, including a failure and a success on the same camera.

Worker timings

These are from the INFO/WARNING logs. Times are UTC and camera labels are anonymized. Queue values are exactly what Keystone logged at admission.

Camera Admitted Queue Finished Result
A 23:27:35.362 2 23:27:50.364 TimeoutError
A 23:27:57.349 1 23:28:05.904 Summary returned
B 23:28:17.659 1 23:28:32.660 TimeoutError
C 23:30:53.217 3 23:31:08.226 TimeoutError

Automatic event captions are working on camera A. One completed in 40.9 seconds and its text was visible in Protect. For the failed on-demand request on camera B, the worker logged that it had already processed a frame about 3.6 seconds after admission.

Environment

  • UniFi Protect 7.3.74 on a UNVR, viewed in Safari.
  • Keystone 0.1.6 AIO with Docker Compose on Ubuntu, Lenovo ThinkCentre M700, Intel Core i5-6400T, 16 GB RAM.
  • Local Ollama running qwen3.5:2b-q4_K_M.
  • This is a locally patched build that keeps Find Anything indexing on two cameras while skipping their automatic captions. On-demand requests timed out on both camera configurations. I haven't reproduced this on an unmodified image.

Does Protect 7.3.74 send a 15-second deadline for these requests? I couldn't tell from the available logs how much of that window went to queueing, model inference, or returning the answer. Is there a diagnostic that records the requested deadline and those timings?

Dominant language
Python
Stars
1k
Forks
114
Avg merge
1h
Merged PRs (30d)
115

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from seeARMS/keystone

All issues in seeARMS/keystone

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.