diff --git a/stacks/cameras/docker-compose.yml b/stacks/cameras/docker-compose.yml index 364090a..50f733a 100644 --- a/stacks/cameras/docker-compose.yml +++ b/stacks/cameras/docker-compose.yml @@ -46,15 +46,17 @@ services: - /config/neolink/neolink.toml:/etc/neolink.toml:ro # neolink can wedge without exiting ("Remaining: 0 of 100 message space"): RTSP stays # up but serves no frames, so Frigate shows the stream offline forever (2026-10-08). - # Probe: pull 30 RTP buffers off the sub stream. After 3 straight failures, SIGKILL + # A stalled stream still bursts ~30 buffered packets on connect, so 30 was a false pass + # for an hour (2026-10-09). Probe: pull 300 RTP buffers off the main stream (~4 s when + # healthy, ~80 pkt/s). After 3 straight failures, SIGKILL # neolink; the image's sh PID 1 then exits and `restart: unless-stopped` brings it back. healthcheck: test: - CMD-SHELL - >- f=/tmp/hc-fails; - if timeout 20 gst-launch-1.0 -q rtspsrc location=rtsp://127.0.0.1:8554/e1/subStream protocols=tcp - ! identity eos-after=30 ! fakesink >/dev/null 2>&1; then echo 0 > $$f; exit 0; fi; + if timeout 20 gst-launch-1.0 -q rtspsrc location=rtsp://127.0.0.1:8554/e1/mainStream protocols=tcp + ! identity eos-after=300 ! fakesink >/dev/null 2>&1; then echo 0 > $$f; exit 0; fi; n=$$(( $$(cat $$f 2>/dev/null || echo 0) + 1 )); echo $$n > $$f; if [ $$n -ge 3 ]; then echo 0 > $$f; for p in /proc/[0-9]*; do [ "$$(cat $$p/comm 2>/dev/null)" = neolink ] && kill -9 $${p#/proc/}; done; fi;