Live view constantly cycles (zms socket errors)

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Live view constantly cycles (zms socket errors)

Post by SkippyDo »

Somewhere along the line I started getting socket errors.

OS: Debian Buster (all current)
ZM: 1.34.15
Cameras: DaHua IPC-HFW1320S (ZM config'd to use H264 passthrough; Source Path: rtsp://<user>:<password>@192.168.1.[108..111]; Method is TCP)

To produce error:
Open up Console in web browser (Firefox) and click on a camera for live viewing. Screen does constant refreshes/updates.

Errors:

Code: Select all

05/27/20 12:47:01.453914 web_php[1588].ERR [107.77.165.32] [Timed out waiting for msg /var/run/zm/zms-025848s.sock] at /usr/share/zoneminder/www/ajax/stream.php line 93
05/27/20 12:47:01.493213 web_php[1588].ERR [107.77.165.32] [No data to read from socket] at /usr/share/zoneminder/www/includes/functions.php line 2177

05/27/20 12:47:01.824169 zms_m2[1710].ERR-zm_monitorstream.cpp/286 [Can't sendto on sd 7: No such file or directory]
I see that /var/run/zm zms sock files are being constantly created (also lock files).

CGI bin path verified correct.

Same hardware worked for 1.30.4. Only diff is that of using H264 under ZM 1.34.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Live view constantly cycles (zms socket errors)

Post by iconnor »

Could be that zmwatch is killing the zmc processes because it is just taking too long to get a stream.

Make sure Options -> System-> WATCH_MAX_DELAY > 30
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Re: Live view constantly cycles (zms socket errors)

Post by SkippyDo »

I think I have found the source/reason for the problem!

I set the web Bandwidth to Medium and that stopped the errors and the constant refreshing. Went ahead and set it to Low just to make sure. Might want to add this note to the error tips?

Having issues getting Montage Review to load. Might be too much over slower connections, don't know yet what's up with that; I don't really use it, so no big deal: was just using it to stress the server (server doesn't really strain at all, even though I know there's lots of stuff going on).

Interestingly, my zmNinja issues were also resolved, though I'm not sure how this happened. I know that I had Low bandwidth set there (and also Auto Bandwidth).

No system updates have been reported to have occurred since the other day when thing weren't working, and I have not made any other config changes: yesterday I cleaned up some SSL stuff and decided to just reboot the server, but no changes from that.

I'm going to run this for a while as it currently is before I install the eventserver bits.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Live view constantly cycles (zms socket errors)

Post by iconnor »

So you are saying that it was giving errors on high bandwidth setting? interesting.

I think I need to review all that code. There is a lot of no longer relevant stuff to remove (flash player, mpeg1 etc).
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Re: Live view constantly cycles (zms socket errors)

Post by SkippyDo »

That seems to be the case. If you can give me a specific set of parameters/settings to go through to test I can report back.

My impression was that the prevalence of socket errors dropped once I kicked the bandwidth setting down: setting within ZM's console (also for my user) as well as on the client (zmNija) side.

In general it just seems like there's a lot of difficulty with communications. Not sure if it's because of switching to video from jpegs (1.30.4). I just don't recall having any such issues with/under 1.30.4.

My WAN interface is via WiFi. My remote use is also via WiFi. There could be some latency issues. Local route time average is about 175ms. I will check to see what it is when running remotely. (accessing from a location farther away- one that my client uses WiFi from that end)

I feel, however, that server performance is excellent. 1.34 seems to run very well on my hardware (any network issues aside), better than 1.30.4 did (which, for my server, was still not making it sweat).
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Re: Live view constantly cycles (zms socket errors)

Post by SkippyDo »

Ugh...

Running remotely, with bandwidth set to Low and running Montage from console is [still] producing socket errors:

Code: Select all

2020-05-31 13:32:18	web_php		19436	ERR	Timed out waiting for msg /var/run/zm/zms-998436s.sock	/usr/share/zoneminder/www/ajax/stream.php	93
2020-05-31 13:32:18	web_php		19436	ERR	No data to read from socket	/usr/share/zoneminder/www/includes/functions.php	2177
2020-05-31 13:32:18	zms_m1		19565	WAR	no last_frame_sent. Shouldn't happen. frame_mod was (2) frame_count (1)	zm_monitorstream.cpp	775
2020-05-31 13:32:13	zms_m2		19558	WAR	Frame send time 3224 msec too slow, throttling maxfps to 0.66	zm_monitorstream.cpp	431
2020-05-31 13:32:12	zms_m1		19557	ERR	Can't sendto on sd 7: No such file or directory	zm_monitorstream.cpp	286
2020-05-31 13:32:12	zms_m3		19559	WAR	Frame send time 8184 msec too slow, throttling maxfps to 0.99	zm_monitorstream.cpp	431
2020-05-31 13:32:12	zms_m4		19560	WAR	Frame send time 7182 msec too slow, throttling maxfps to 0.44	zm_monitorstream.cpp	431
2020-05-31 13:32:11	web_php		19436	ERR	Timed out waiting for msg /var/run/zm/zms-166587s.sock	/usr/share/zoneminder/www/ajax/stream.php	93
2020-05-31 13:32:11	web_php		19436	ERR	No data to read from socket	/usr/share/zoneminder/www/includes/functions.php	2177
2020-05-31 13:32:11	zms_m1		19557	WAR	Frame send time 6007 msec too slow, throttling maxfps to 0.99
I haven't messed with the bit rate.
dhmsjs
Posts: 23
Joined: Fri May 28, 2021 1:53 pm

Re: Live view constantly cycles (zms socket errors)

Post by dhmsjs »

Old thread I know. My system is similar to the OP's Running v1.34.22 on RPI3 with 2Gb ram and a 2TB USB HDD for storage.

Viewing ZM offsite through a relatively modest (8Mbps down/800kbps up) ADSL connection. ZM is logging very similar errors when viewing a live feed. No errors when just viewing Console page.

As per @iconnor I Increased Options -> System-> WATCH_MAX_DELAY to 40 (from 5 I think!), which may have helped reduce errors, but only marginally.

Switched ZM bandwidth from High to Medium and noticed an immediate improvement. Low seems to be even more stable for me. I had dropped frame rate to 4fps in both cameras in an effort to give ZM more breathing room, but was still getting these errors. Now at Low BW with 2 cameras at 10fps ZM still seems pretty happy showing me live feeds. I do get occasional errors when switching pages etc, but very few.

I think I need to understand better what changes the BW setting is making. Off to read the docs... :-)
Post Reply