Didn't see you show up in our IRC like I asked in my github reply, so I'll respond here.
This is a classic problem when ZoneMinder runs out of hardware or network resources. Seen it many times.
More specifically, no one who works on this project has ever stated you could reliably run four HD cameras with ZoneMinder on any Raspberry Pi. 1-2 HD cameras is the recommendation. Yeah, I know you said you had it working for zm 1.28, but we have never stated, much less guaranteed, that would work. Go back to using 1.28 if you want. A second Pi might help, but not so much if the problem is your network.
For starters, do the following:
- Undo everything you have done relating to shmall and shmax. Put it back to default. Like bbunge said, those parameters have not been used for a long time. shmall and shmax are for shared memory. ZoneMinder used
mapped memory, which is not the same. I'm sorry you may have come across community documentation stating otherwise. Feel free to contact the author of the guide you followed and ask him or her to update it.
- After you reduced the buffer settings to 20, your /dev/shm of 211MB looks reasonable if that value is correct. Keep an eye on it. Resolution, buffersize, and number of cameras directly affect /dev/shm and the cameras you are using can easily fill that up in the blink of an eye.
- You said the framerate was 3 fps. Verify it still is and that value has been set
in the camera. You are guaranteed to have big problems if you try to limit the frame rate in zoneminder rather than in the camera.
- I don't recall if arm chips have SSE instruction set. I think not, but try setting your color depth to 32bit. If it works, you will get a performance boost.
Messages like this imply a network interruption:
Code: Select all
06/30/16 01:40:28.693769 zmc_m4[29959].DB3-zm_remote_camera_http.cpp/132 [Disconnected from host]
Code: Select all
06/29/16 23:42:11.719014 zmc_m4[29959].DB4-zm_remote_camera_http.cpp/168 [Select timed out timeout was 0 secs 0 usecs]
In addition to memory, disk i/o and cpu resources are limited on the pi. We need more information to get a better idea of your system:
How much cpu resources are being consumed?
What kind of disk are you recording events to? How is the disk connected to the Pi?
The Pi does not have a good high i/o solution. Writing to an sd card can be problematic, and going through the USB bus to something else will present a new bottleneck which will affect all attached usb devices. The best you can hope for is mapped or iscsi connection to a NAS box, over the wired ethernet port.
We know how the picam is attached, but what kind of network connection do you have for your other three cameras and the raspberry pi?
Please don't say Wifi.
We need to see the complete camera configuration for all four of your cameras. Show us the General and Source tabs. Screenshots are preferred. Knowing the make and model of your Foscam cameras would help too.
So there you go. These are some things to look into and some data to provide. Again, we make no guarantees you will be able to get this to work, nor have we ever stated it will, using a Raspberry Pi. My free time is valuable to me, so if you continue with the assumption it must be a bug or continue to make implications this is somehow our problem, which we must fix for you for free, then I will simply spend my free time helping someone else.