1.30.0 Crashes Suddenly

Forum for questions and support relating to the 1.30.x releases only.
Locked
sheshman
Posts: 5
Joined: Thu Sep 29, 2016 9:06 am

1.30.0 Crashes Suddenly

Post by sheshman »

Hi,

I'm using v 1.30.0. on ubuntu server 16.04.1 LTS X64, i have 50 ip cameras (it's a turkish brand but manufactured in china), i'm capturing rtsp streams via ffmpeg or libvlc without any problem by using automated .sh files(i'm creating 30 minutes long MP4 files,there are no corruption on video,it works fine).

As you can imagine dealing with 50 cameras can be pain in the butt so that's why i want to switch to ZoneMinder. I made som tests with 5-8 cameras during last week and it seems like ZoneMinder is right choice to manage my cameras.

Today i've added my 50 cameras to system,it worked good and load was between Load: 40.05 & 56.00 which is ok for me. But 10-15 minutes later ZoneMinder stopped to work and all cameras went red on the console.

I thought maybe it's going down because of Libvlc so i've switched to ffmpeg but it did happen again after 10-15 minutes. Since the first installation even with 5-8 cameras my log is allways red and there are warnings, i'm very rookie on Linux systems that's why i didn't understand what is happening.

Tried to stop and start zoneminder service via SSH Terminal but everytime it says "Job for zoneminder.service failed because a timeout was exceeded. See "systemctl status zoneminder.service" and "journalctl -xe" for details.".

My Server's configuration ;
HP Proliant
1X Intel Zeon 2.30 Ghz
16 GB Ram
Ubuntu Server 16.04.1 LTS X64

I did installation following this article : http://zoneminder.readthedocs.io/en/lat ... untu-16-04

Screenshot of my monitor configuration & Console;

Image
Image
Image

My Logs are attached to this post.

Sorry for bad English and thanks in advance.
Attachments
Logs.zip
(30.49 KiB) Downloaded 120 times
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: 1.30.0 Crashes Suddenly

Post by bbunge »

Bet you ran out of tmpfs space. Lower your resolution (640x360), color space to 32 bit and frame rate (at the cameras to 5 FPS). With 50 cameras and only 16 GIG RAM you may need to go to 320x180 resolution.

Start out low and increase.
Check the free space in /dev/shm Ubuntu will use half of available RAM for tmpfs. You can increase this but with te number of cameras you are using your database will need extra memory for the innodb_buffer_pool_size. Run mysqltuner to get recommended settings.

No, I am not nuts! Have seen this issue before...

bb
sheshman
Posts: 5
Joined: Thu Sep 29, 2016 9:06 am

Re: 1.30.0 Crashes Suddenly

Post by sheshman »

bbunge wrote:Bet you ran out of tmpfs space. Lower your resolution (640x360), color space to 32 bit and frame rate (at the cameras to 5 FPS). With 50 cameras and only 16 GIG RAM you may need to go to 320x180 resolution.

Start out low and increase.
Check the free space in /dev/shm Ubuntu will use half of available RAM for tmpfs. You can increase this but with te number of cameras you are using your database will need extra memory for the innodb_buffer_pool_size. Run mysqltuner to get recommended settings.

No, I am not nuts! Have seen this issue before...

bb
thanks for your help, i did run mysqltuner and it did some changes,i've deleted all cameras and just added 5 to see what happens;

-even with 5fps(setted on camera) and 320*180 resolution not so much changes,still freezes and crashes.
-i've checked if there is a problem on my network but everything works fine, i mean there is a web interface which you can watch all the cameras together on it and when i open that all 50 cameras at 25Fps viewing without any freeze or corruption on video.
-i've tried my .sh files (which are recording stream with vlc or ffmpeg via command line as mp4 files) and both ffmpeg and vlc works without any problem, no delay nor corruption on recorded mp4 files.
-with all tests proof that server has no problem with hardware or network and it's capable of to manage 50 cameras.
-all problems starting when i start testing zoneminder.

Bottom line is,i'll continue to use .sh files to record camera streams, zoneminder could be good to using on 5 or less cameras but it seems like it's far away from being a good surveillance server for big sized systems.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: 1.30.0 Crashes Suddenly

Post by knight-of-ni »

You will not be able to get 50 HD cameras running with the hardware you've got. Your hardware is vastly underpowered. It isn't even close. And no, you can't compare what ZoneMinder does to your .sh scripts because they are not doing the same thing.

You should search all the other forum threads regarding the topic "crashes suddenly or randomly". The one thing they all have in common is the end user has managed to overload their system and have reached the limits of their hardware. Sometimes its easy to find what the limit is. A simple df -h will tell you if you've run your ram disk out of memory. Other times its much more difficult, especially if you've managed to get your hardware right on the edge of failure. The problem may only happen when some background task tries to run, which pushed the system over the edge.

We know from our telemetry data that, there are 20K active ip addresses running zoneminder right now, and these are only the cases where the user has chosen to leave the telemetry & update daemons running. We know from the data that many of these sites have 50+ cameras, and they run just fine.

In addition to what bbunge said, set your source type to ffmpeg. We can come back to libvlc later if we need to. Enable just one camera at the parameters bbunge stated, and run the system. If it crashes then we need to see real data.

Its your choice if you want to continue to troubleshoot this, but if you do want to get to the bottom of this, you need to include data with every response, rather than say "doesn't work". We need to know how it doesn't work, and one does that by including a new set of logs.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked