QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
257 stars 41 forks source link

Neolink stops the process #108

Closed Veuchez closed 11 months ago

Veuchez commented 1 year ago

Describe the bug The process of Neolink on Ubuntu stops with the following error.

(neolink:147947): GStreamer-CRITICAL **: 09:46:24.005: gst_poll_get_read_gpollfd: assertion 'set != NULL' failed

(neolink:147947): GLib-ERROR **: 09:46:24.005: Creating pipes for GWakeup: Too many open files

I have restarted the process numerous times and after a few hours I always find it interrupted with the same final error. It follows with both one and two cameras, both at 1536kbps I attach the complete LOG log2.txt

Versions NVR software: Frigate Neolink software: 0.5.13 Reolink camera model and firmware: Argus 3 PRO firmware version v3.0.0.1462_22102900

Veuchez commented 1 year ago

@QuantumEntangledAndy I noticed that when a camera disconnects from the Wi-Fi and then reconnects, Neolink is unable to load it upon reconnection. Is it happening only to me?

QuantumEntangledAndy commented 1 year ago

Are you on linux? If so can you list open file descriptors using

ls -l /proc/{{NEOLINK_PID}}/fd

Where you replace {{NEOLINK_PID}} with the process ID of neolink

That will tell me which file handle is not being closed. I am not sure why we get this though because the only file I open is the config file, so this may be a bug in gstreamer

Might not be file related but could be socket related too. Perhaps you have too many open UDP sockets?

QuantumEntangledAndy commented 1 year ago

Might be related to this one

https://github.com/arturoc/ofxGStreamer/issues/15

Where the limit is set to low in your environment so you cannot create enough UDP sockets for your number of cameras

QuantumEntangledAndy commented 11 months ago

Since this seems to be an issue with the file socket limit on you machine I am going to close this. There are also changes in the works that should reduce the number of sockets needed during discovery but most likely this won't help you as your issues seems to be with the gstreamer code opening more sockets then supported.