-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add healthcheck #707
base: master
Are you sure you want to change the base?
Add healthcheck #707
Conversation
f8401c7
to
5689589
Compare
5689589
to
b9f1d4f
Compare
API port may be closed or using another number |
Right, I have an idea to fix that. |
@felipecrs as go2rtc has static config path in docker, you could parse config file and use it in healthcheck sh script. It's possibility describes here https://stackoverflow.com/questions/55375371/using-a-sh-script-for-docker-healthchecks |
People in Frigate's world have seen go2rtc hanging many times. That's why Frigate (myself) built its own healthcheck for go2rtc to restart it when it hangs. I, for one, have an issue open that describes a hanging situation happening in latest version 1.8.4:
I don't see how invoking a new go2rtc process would help to assess the functionality of the existing one. |
That's a very good idea, and it was what I was intending to do too. But then I forgot about this PR. lol |
I mean I had never seen hanging go2rtc myself and I don't know what exactly needs to check like rtsp port or web port. What is staying accessed when process hangs. |
Probably it could be related to this pr #440 to track for example sighup signal |
@bonuzzz, can you elaborate? |
@felipecrs unfortunately I don't know how to reproduce go2rtc hanging in my environment. I think more complex solution is needed here than just to check open ports, because we don't know how the process behaves itself in hanging state. |
Very dirty solution for frigate is parsing /dev/shm/logs/go2rtc/current for phrase "sync.(*Mutex).Lock(...)", "goroutine" of "WRN [streams] json locked" like tail -f /dev/shm/logs/go2rtc/current | grep "json locked" |
I think the current solution Frigate uses is already very good. :) |
This is work in progress, I will write more details before I mark it as ready for review.
Benefits:
For now, this is blocked by:
--start-interval
does not do anything moby/buildkit#4355