zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by jepide »

Hello !
In this file
https://www.dropbox.com/s/2pih1qr4ff4nk ... ogsov?dl=0
you may see what is my hardware and software system, and see a copy of syslog for two sequences of start/freeze.
The problem is that Ubuntu/zoneminder freezes after it has nice run for 5 minutes or 5 hours (or every thing else).
I am not able to find a way to solve this problem.
May somebody have a look to , and help me ?
Thanks you.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by bbunge »

Can not view your file.

Things to check:
Free memory in tmpfs (/dev/shm) lower camera resolution or add more RAM
Run mysqltuner and make recommended changes
Lower frame rate and resolution. If IP cameras do this at the camera.

See the instructions at https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way to see if you missed something.
jwarfin
Posts: 41
Joined: Mon Jul 23, 2018 4:36 am

Re: zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by jwarfin »

To look at your log file I had to download it.

So, you have ZM running on Ubuntu on a Gigabyte BRIX GB-BXBT-1900 (basically, a SFF PC). Your log (it's BIG) seems to show ZM running OK - I saw no sign of any serious errors. No sign of a Linux crash or panic in the log. It appears the system just freezes, as you say.

The log did show some warnings or problems related to Linux trying to enumerate all the features on the BRIX motherboard. Hard for me to make sense of those.

I did some googling...

I saw more than a few reports/complaints of Linux freezing at random times on your BRIX model. The reports were from users using different Linux versions (Mint, Debian, Ubuntu). Most of those reports were from a year or two ago. You might check to see if there is updated firmware to fix the freezing.

Another common issue I saw mentioned in the reports was CPU temperature running surprisingly hot (> 70C) under what they considered moderate-to-high (not extreme) load. This was reported by people that also had random freezes with Linux. ZM can put a lot of load on a system - especially when handling numerous events over a relatively short period of time. Some systems will immediately halt/freeze if the CPU temp gets too high. Current motherboard & CPUS are designed to just throttle the CPU down to prevent overheating. Perhaps your BRIX model doesn't throttle down on high CPU temps.

Anyway, if CPU overtemp is what's causing your problems then you have to improve the BRIX cooling and/or reduce the load. Easiest way to reduce load from ZM is to reduce camera resolution, FPS, color depth (ie: go to B&W). Same principle for zones: reduce their number and size and use zone settings that have lower overhead. Not ideal - but this may be needed for your BRIX model.
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

Re: zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by jepide »

Thanks bbunge for your reply.

To open the file https://www.dropbox.com/s/2pih1qr4ff4nk ... ogsov?dl=0 you have just to clic on this address, that normally open a new window in browser, and then clic the download case in this page for downloading the file. It is a text file. Instead you may copy the address in browser.

I think that i have plenty of memory
jpd@barebone:~$ df -h /dev/shm
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
tmpfs 3,8G 359M 3,5G 10% /dev/shm

In order to run mysqltuner I tried to recover login&password that I have forgotten. I used https://www.techrepublic.com/article/ho ... -password/ but somewhere it comes:
sudo service mysql stop
sudo mysqld_safe —skip-grant-tables —skip-networking ->OK
jpd@barebone:~$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Is there a problem with mysql (mariadb) ?

My two cameras run 7fps . that does not look too much ?.

Don't you have an other idea ?
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

Re: zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by jepide »

Many thanks jwarfin

Its really a good explanation and i agree that my problems may be due to overheating. I will check to see if there is an updated firmware to fix the freezing. If not, I do not want to decrease the quality, also I need to add a third camera, so I will be thinking of changing the computer. But it is difficult to find a small reliable computer specialized for this task and not too expensive ... (I had before a Solid_run_pc_q4 which ran fine for several weeks then fails definitively..)
However I’m not absolutely sure I’m dealing with overheating
Haven't you a new idea why Linux is trying to enumerate all the features on the BRIX motherboard ?
jwarfin
Posts: 41
Joined: Mon Jul 23, 2018 4:36 am

Re: zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by jwarfin »

jepide wrote: Fri Apr 05, 2019 9:42 am ...
Haven't you a new idea why Linux is trying to enumerate all the features on the BRIX motherboard ?
It's normal for Linux to enumerate the motherboard on boot. It does this to probe the motherboard and figure out what kernel modules to load and what kernel settings/modes to set that (hopefully) support the motherboard.

Looking at your logs, I see a number of issues that may indicate problems supporting your motherboard.
Apr 2 21:41:56 barebone kernel: [ 0.302928] pci 0000:00:1c.0: BAR 14: no space for [mem size 0x00200000]
Apr 2 21:41:56 barebone kernel: [ 0.302932] pci 0000:00:1c.0: BAR 14: failed to assign [mem size 0x00200000]
Apr 2 21:41:56 barebone kernel: [ 0.302941] pci 0000:00:1c.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Apr 2 21:41:56 barebone kernel: [ 0.302944] pci 0000:00:1c.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
The above indicates devices on the PCI bus cannot be memory mapped. There's no easy workarounds for this. Google "pci 0000:00:1c.0: BAR 14: failed to assign [mem size 0x00200000" to see how some people have dealt with this.
Apr 2 21:41:56 barebone thermald[690]: sysfs read failed constraint_0_max_power_uw
Thermald is the Linux service that watches CPU temperature and throttles the CPU back if too hot. The above message may be an indication thermald can't watch some important CPU temperature data items... which might prevent it from throttling properly when needed. No idea how to fix this.

There's also a number of warning messages related to the graphics driver setup at boot. Might be problems or might not.

I also see a number of "USB disconnect" related log messages and subsequent "unhandled action 'unbind'" messages related to the disconnects. No idea what this is about or what to do about it - other than one or two things on the USB bus are dropping or you removed them abruptly.

Good luck.
jepide
Posts: 18
Joined: Sun Nov 12, 2017 7:01 am

Re: zoneminder v1.32.3 on ubuntu 18.04 LEMP freeze randomly

Post by jepide »

Many thanks jwarfin, and all those who have tried to help me

I learned a lot from your posts. I understand that my BRIX motherboard does not support Linux.
In any case, my BRIX is now down, I don’t even have access to the bios. I’m going to change this device.
It was a pleasure to find someone to help.
Post Reply