Zone minder crash

Forum for questions and support relating to the 1.29.x releases only.
Locked
thevinz
Posts: 10
Joined: Sun Mar 31, 2013 8:56 pm

Zone minder crash

Post by thevinz »

Hello all,

First of all, sorry for my english, (i'm french)

I have install a new 1.29 Zone minder an raspbian on a raspberry P3.
I use 3 cameras ESCAM (@ 5fps and 704 * 576 in RTP/RTSP protocol)
It works fine but the server Zone minder crash (or stop) every 4 hours.... I don't understand why ?

Here is the log before the last crash:

Code: Select all

2017-05-29 10:53:16.189428	zms		16192	ERR	Terminating, last frame sent time 10.062471 secs more than maximum of 10.000000	zm_monitor.cpp	4392
2017-05-29 10:53:06.012397	zma_m2		15898	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-29 10:53:06.011251	zmc_m2		14402	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-29 10:53:06.009518	zmc_m1		15945	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-29 10:53:06.002424	zmc_m3		13632	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-29 10:53:02.884970	zmpkg		16400	INF	Command: stop	zmpkg.pl	
2017-05-29 10:53:02.857570	zmpkg		16400	INF	Sanity checking States table...	zmpkg.pl	
2017-05-29 10:53:00.190220	zmdc		13522	INF	'zma -m 1' exited normally	zmdc.pl	
2017-05-29 10:52:55.475490	zmdc		13522	WAR	'zma -m 1' has not stopped at 17/05/29 10:52:55. Sending KILL to pid 16323	zmdc.pl	
2017-05-29 10:52:55.179500	zmaudit		13650	INF	deleting	zmaudit.pl	
2017-05-29 10:52:50.298026	zmc_m1		15945	WAR	Buffer overrun at index 3, image 11803, slow down capture, speed up analysis or increase ring buffer size	zm_monitor.cpp	3100
2017-05-29 10:52:49.563960	zmaudit		13650	INF	Filesystem event '1/1239' does not exist in database	zmaudit.pl	
2017-05-29 10:52:49.518189	zma_m1		16323	INF	Devanture: 2331 - Closing event 1250, shutting down	zm_monitor.cpp	625
2017-05-29 10:52:49.481950	zmaudit		13650	INF	deleting	zmaudit.pl	
2017-05-29 10:52:49.474202	zma_m1		16323	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-29 10:52:49.422870	zmaudit		13650	INF	Filesystem event '1/1232' does not exist in database	zmaudit.pl	
2017-05-29 10:52:47.911113	zmc_m1		15945	WAR	Buffer overrun at index 98, image 11798, slow down capture, speed up analysis or increase ring buffer size	zm_monitor.cpp	3100
2017-05-29 10:52:45.561710	zmdc		13522	INF	'zma -m 1' sending stop to pid 16323 at 17/05/29 10:52:45	zmdc.pl	
2017-05-29 10:52:44.087550	zmaudit		13650	INF	deleting	zmaudit.pl	
2017-05-29 10:52:43.396230	zmaudit		13650	INF	Filesystem event '1/1235' does not exist in database	zmaudit.pl	
2017-05-29 10:52:42.851710	zmwatch		13664	INF	Restarting analysis daemon for Devanture	zmwatch.pl	
2017-05-29 10:52:39.965170	zmwatch		13664	INF	Analysis daemon for Devanture needs restarting, time since last analysis 9 seconds (1496047959-1496047950)	zmwatch.pl	
2017-05-29 10:52:23.705591	zma_m1		16323	INF	Devanture: 2312 - Opening new event 1250, alarm start	zm_monitor.cpp	1651
2017-05-29 10:52:21.166347	zma_m1		16323	INF	Devanture: 2312 - Gone into alarm state	zm_monitor.cpp	1605
2017-05-29 10:52:17.051487	zma_m2		15898	INF	Garage: 13000 - Analysing at 5.00 fps	zm_monitor.cpp	1287
2017-05-29 10:52:06.657136	zma_m1		16323	INF	Devanture: 2229 - Closing event 1249, alarm end	zm_monitor.cpp	1707
2017-05-29 10:52:05.343195	zma_m1		16323	INF	Devanture: 2229 - Left alarm state (1249) - 31(1) images	zm_monitor.cpp	1702
2017-05-29 10:52:02.898358	zma_m1		16323	INF	Devanture: 2214 - Gone into alert state	zm_monitor.cpp	1695
2017-05-29 10:51:56.926584	zma_m1		16323	INF	Devanture: 2213 - Opening new event 1249, alarm start	zm_monitor.cpp	1651
2017-05-29 10:51:56.200829	zma_m1		16323	INF	Devanture: 2213 - Gone into alarm state	zm_monitor.cpp	1605
2017-05-29 10:51:13.647142	zma_m1		16323	INF	Devanture: 2000 - Analysing at 4.95 fps	zm_monitor.cpp	1287
2017-05-29 10:51:04.615859	zmc_m2		14402	INF	Garage: 40000 - Capturing at 5.00 fps	zm_monitor.cpp	3131
2017-05-29 10:50:40.716840	zmc_m3		13632	INF	Salon: 58000 - Capturing at 5.00 fps	zm_monitor.cpp	3131
2017-05-29 10:50:08.371933	zmc_m1		15945	INF	Devanture: 11000 - Capturing at 4.85 fps	zm_monitor.cpp	3131
2017-05-29 10:48:57.331262	zma_m2		15898	INF	Garage: 12000 - Analysing at 5.00 fps	zm_monitor.cpp	1287
2017-05-29 10:47:51.470496	zma_m1		16323	INF	Devanture: 1000 - Analysing at 4.95 fps	zm_monitor.cpp	1287
2017-05-29 10:47:44.836643	zmc_m2		14402	INF	Garage: 39000 - Capturing at 5.03 fps	zm_monitor.cpp	3131
2017-05-29 10:47:20.666034	zmc_m3		13632	INF	Salon: 57000 - Capturing at 5.00 fps	zm_monitor.cpp	3131
2017-05-29 10:46:42.775050	zmc_m1		15945	INF	Devanture: 10000 - Capturing at 5.03 fps	zm_monitor.cpp	3131
2017-05-29 10:45:37.717119	zma_m2		15898	INF	Garage: 11000 - Analysing at 5.00 fps	zm_monitor.cpp	1287
2017-05-29 10:44:29.920593	zma_m1		16323	INF	In mode 3/1, warming up	zma.cpp	142
Can someone help me to solve the problem ??

Thank you
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Zone minder crash

Post by bbunge »

Bonjour!
My French is a bit rusty so I will try my English.

With the P3 you may be running out of memory. Check the space used in the tmpfs especially the area defined by PATH_MAP. If this space is full you need to reduce the resolution of the cameras.

Hope this works!
thevinz
Posts: 10
Joined: Sun Mar 31, 2013 8:56 pm

Re: Zone minder crash

Post by thevinz »

Thank you for your answer,

Here is se size of my PATH_MAP :

Code: Select all

pi@zoneminder:~ $ df /dev/shm
Filesystem     1K-blocks   Used Available Use% Mounted on
tmpfs             472760 282612    190148  60% /dev/shm
Is that a way to enlarge this file ?
User avatar
iconnor
Posts: 2894
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zone minder crash

Post by iconnor »

Only to a point. It is a ram disk, so you are limited by ram.

You may be using more ram than needed per camera though. Edit the Monitor and lower the values in the buffers tab, specifically the Image Buffer Size. It defaults to 50, which is actually a lot. It must be more than Pre Event Image Count.
thevinz
Posts: 10
Joined: Sun Mar 31, 2013 8:56 pm

Re: Zone minder crash

Post by thevinz »

I'm on a raspberry pi 3 so I have 1g of memory I think ?
My hsrae memory is only 458M. Couldn't I extend shared memory for zoneminder ?
How i do that ?

Code: Select all

Filesystem                Size  Used Avail Use% Mounted on
/dev/root                  57G  2.3G   53G   5% /
devtmpfs                  458M     0  458M   0% /dev
tmpfs                     462M  276M  186M  60% /dev/shm
tmpfs                     462M   24M  439M   6% /run
tmpfs                     5.0M  4.0K  5.0M   1% /run/lock
tmpfs                     462M     0  462M   0% /sys/fs/cgroup
/dev/mmcblk0p1             63M   22M   42M  35% /boot
192.168.0.35:/zoneminder  5.3T  1.9T  3.5T  35% /mnt/zoneminder
tmpfs                      93M     0   93M   0% /run/user/1000
thevinz
Posts: 10
Joined: Sun Mar 31, 2013 8:56 pm

Re: Zone minder crash

Post by thevinz »

I'm not sure that the size of the memory is the cause of the crashes.
Here is the log of the last crash:

Code: Select all

2017-05-30 17:49:46.278980	zmwatch		32652	ERR	Unable to run "/usr/bin/zmdc.pl restart zma -m 1", output is "Unable to connect to server"	zmwatch.pl	
2017-05-30 17:49:44.720210	zmpkg		6771	INF	Command: stop	zmpkg.pl	
2017-05-30 17:49:38.226420	zmwatch		32652	INF	Restarting analysis daemon for Devanture	zmwatch.pl	
2017-05-30 17:49:37.240340	zmpkg		6771	INF	Sanity checking States table...	zmpkg.pl	
2017-05-30 17:49:29.575810	zmwatch		32652	ERR	Error getting last capture time for Devanture	zmwatch.pl	
2017-05-30 17:49:08.954256	zmc_m2		5952	INF	Garage: 22000 - Capturing at 5.03 fps	zm_monitor.cpp	3131
2017-05-30 17:48:52.318080	zmdc		22414	INF	'zma -m 1' exited normally	zmdc.pl	
2017-05-30 17:48:42.452720	zmdc		22414	WAR	'zma -m 1' has not stopped at 17/05/30 17:48:42. Sending KILL to pid 6765	zmdc.pl	
2017-05-30 17:48:36.442433	zma_m1		6765	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-30 17:48:31.447290	zmdc		22414	INF	'zma -m 1' sending stop to pid 6765 at 17/05/30 17:48:31	zmdc.pl	
2017-05-30 17:48:27.654646	zma_m1		6765	INF	In mode 3/1, warming up	zma.cpp	142
2017-05-30 17:48:27.607630	zmwatch		32652	INF	Restarting analysis daemon for Devanture	zmwatch.pl	
2017-05-30 17:48:25.591960	zmwatch		32652	ERR	Error getting last capture time for Devanture	zmwatch.pl	
2017-05-30 17:48:23.600825	undef		6765	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
2017-05-30 17:48:23.411570	zmdc		22414	INF	'zma -m 1' starting at 17/05/30 17:48:23, pid = 6765	zmdc.pl	
2017-05-30 17:48:23.406770	zmdc		6765	INF	'zma -m 1' started at 17/05/30 17:48:23	zmdc.pl	
2017-05-30 17:48:21.086860	zmdc		22414	INF	Starting pending process, zma -m 1	zmdc.pl	
2017-05-30 17:48:01.359490	zmdc		22414	INF	'zma -m 1' exited, signal 14	zmdc.pl	
2017-05-30 17:47:51.205130	zmdc		22414	INF	'zma -m 1' sending stop to pid 6760 at 17/05/30 17:47:51	zmdc.pl	
2017-05-30 17:47:50.010466	zma_m1		6760	INF	In mode 3/1, warming up	zma.cpp	142
2017-05-30 17:47:49.782343	zmc_m1		1904	INF	Devanture: 120000 - Capturing at 5.00 fps	zm_monitor.cpp	3131
2017-05-30 17:47:48.959392	undef		6760	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
2017-05-30 17:47:41.524190	zmwatch		32652	INF	Restarting analysis daemon for Devanture	zmwatch.pl	
2017-05-30 17:47:40.741450	zmdc		6760	INF	'zma -m 1' started at 17/05/30 17:47:40	zmdc.pl	
2017-05-30 17:47:40.729880	zmdc		22414	INF	'zma -m 1' starting at 17/05/30 17:47:40, pid = 6760	zmdc.pl	
2017-05-30 17:47:35.700350	zmwatch		32652	ERR	Error getting last capture time for Devanture	zmwatch.pl	
2017-05-30 17:47:35.071070	zmdc		22414	INF	Starting pending process, zma -m 1	zmdc.pl	
2017-05-30 17:47:25.622100	zmdc		22414	INF	'zma -m 1' exited normally	zmdc.pl	
2017-05-30 17:47:24.261511	zma_m1		6742	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2017-05-30 17:47:17.179370	zmdc		22414	INF	'zma -m 1' sending stop to pid 6742 at 17/05/30 17:47:17	zmdc.pl	
2017-05-30 17:47:15.210932	zma_m1		6742	WAR	Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size	zm_monitor.cpp	1315
2017-05-30 17:47:15.104139	zmc_m1		1904	WAR	Last image read from shared memory 1496159235 seconds ago, zma may have gone away	zm_monitor.cpp	3106
2017-05-30 17:47:13.736339	zma_m1		6742	INF	In mode 3/1, warming up	zma.cpp	142
2017-05-30 17:47:13.635270	zmwatch		32652	INF	Restarting analysis daemon for Devanture	zmwatch.pl	
2017-05-30 17:47:11.878771	zmc_m1		1904	WAR	Buffer overrun at index 3, image 119803, slow down capture, speed up analysis or increase ring buffer size	zm_monitor.cpp	3100
2017-05-30 17:46:57.068610	zmwatch		32652	INF	Analysis daemon for Devanture needs restarting, time since last analysis 27 seconds (1496159217-1496159190)	zmwatch.pl	
2017-05-30 17:46:56.498054	undef		6742	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
Help please !!!
Locked