I have a ZM 1.30.4 server with 25 cameras running on Ubuntu Server 16.04. It's a mixture of analog cameras and IP cameras. All cams use ffmpeg, 13 pulled from an older analog DVR and the rest from IP cams. A couple of weeks ago I upgraded the server and increased RAM from 16GB to 32GB and added additional hard drive space. I reduced the resolution of all cameras to 640x360 and the fps to 15 or less to reduce the load on the server for analysis. I also set up additional nodect monitors for all of the IP cameras and configured them to trigger from their lower-resolution counterparts when motion was detected so that I could get an additional HD capture during motion. Shortly after the upgrade, I started experiencing problems. A camera or two would drop out and then the problem would kind of cascade through all the rest of the cams. In montage view you could see most of the camera go offline and then return within 20-30 seconds and the Source column on the main ZM page would turn red. It's typically much worse when there is a lot of motion happening. It almost always starts with the older analog streams but then affects all the others.
When this cascading outage occurs, I find a lot of mysql errors like this:
Code: Select all
2018-02-23T13:37:09.331389Z 28076 [Note] Aborted connection 28076 to db: 'zm' user: 'zmuser' host: 'localhost' (Got an error reading communication packets)
I've been researching this for days. I can't decide whether the problem is on the MySQL side and it ripples into ZM or if it's the other way around. I've run mysqltuner and adjusted various things in MySQL but it hasn't helped so I've backed out most of the suggestions.
My CPU load is around 70-80% and my network throughput is 80-90Mbps. ifconfig shows no dropped packets. My SHM looks like this:
I'm attaching a couple of log files I could sure use some help figuring this out.