WEbcam limit

Forum for questions and support relating to the 1.28.x releases only.
Locked
s80ts0465
Posts: 10
Joined: Mon Oct 12, 2015 8:49 pm

WEbcam limit

Post by s80ts0465 »

Hi,

I correctly setup 7 webcam and everything works perfectly, but then I'm not able to instal any other webcam. The 8th and more are always highlighted in red.
I tried to change the IP of the 8th camera with the working setting of the 5th camera and it works, so it's not a problem of webcam settings.

The server is running on a very old machine with only 2Gb of RAM, Pentium 4 3GHz.

Any suggest on how to solve the problem? is the old pc the possible cause of the malfunction?

Bye
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: WEbcam limit

Post by knight-of-ni »

Let me focus..... mmmmmmm..... nope. Can't read your mind. You must be asleep or too far away.

In order to answer your question with any precision, you need to describe you system in detail:
- Linux distro
- Version of Zoneminder
- make/model of each camera
- The frame rate and resolution each camera is set to
- The monitor settings of each of your monitors
- What is the value of the system load with all those cameras?

And most importantly, we need the contents of your zoneminder log the describe the cameras which are not working. More is better. Don't cherry pick the error messages.
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/
s80ts0465
Posts: 10
Joined: Mon Oct 12, 2015 8:49 pm

Re: WEbcam limit

Post by s80ts0465 »

Hi:

Linux distro = Ubuntu 14.04 LTS
Version of Zoneminder = 1.28.2
model of each camera = Axis M5014 (all the same type of camera)
The frame rate each camera is set to = 2fps
resolution each camera is set to = 1280x720

The monitor settings of each of your monitors (it's the same for all the cameras and it work for 6 camera)
Remote Protocol HTTP
Remote Method Simple
source=username:password@IP
Remote Host Path /axis-cgi/jpg/image.cgi
Target Colorspace 24bit

What is the value of the system load with all those cameras? = 0.04
I didn't set events

The log from the web when I try to open the camera that doesn't work:

Code: Select all

2015-10-14 14:39:53.038077	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:52.973875	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:51.625422	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:51.554997	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:50.275358	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:50.211175	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:48.869963	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:48.795942	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:47.447566	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:47.368351	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:46.066439	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:46.005903	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:44.691625	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:44.631271	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:43.306656	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:43.227283	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:41.917643	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:41.809910	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:40.463494	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:40.050240	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:39.626395	web_js	3502	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:38.429797	web_php	3502	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:37.390463	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:37.014047	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:35.990343	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:35.641764	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:34.639194	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:34.585150	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:33.298659	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:33.037798	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:31.855943	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:31.471111	web_php	3503	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:30.452713	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:30.411357	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:29.409863	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:29.366460	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:28.364290	web_js	6773	ERR	getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused - checkStreamForErrors()	?view=watch	
2015-10-14 14:39:28.311459	web_php	6773	ERR	socket_sendto( /var/run/zm/zms-296896s.sock ) failed: Connection refused	/usr/share/zoneminder/includes/functions.php	2330
2015-10-14 14:39:27.705807	zms	6833	INF	addr2line -e /usr/lib/cgi-bin/nph-zms 0x80bc922 0xb7780410 0x8087425 0x8096c1d 0x804e512 0xb6231a83 0x804d5f1	zm_signal.cpp	106
2015-10-14 14:39:27.672406	zms	6833	INF	Backtrace complete, please execute the following command for more information	zm_signal.cpp	105
2015-10-14 14:39:27.637718	zms	6833	ERR	Backtrace 6: /usr/lib/cgi-bin/nph-zms() [0x804d5f1]	zm_signal.cpp	98
2015-10-14 14:39:27.595981	zms	6833	ERR	Backtrace 5: /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb6231a83]	zm_signal.cpp	98
2015-10-14 14:39:27.554067	zms	6833	ERR	Backtrace 4: /usr/lib/cgi-bin/nph-zms() [0x804e512]	zm_signal.cpp	98
2015-10-14 14:39:27.512240	zms	6833	ERR	Backtrace 3: /usr/lib/cgi-bin/nph-zms() [0x8096c1d]	zm_signal.cpp	98
2015-10-14 14:39:27.470429	zms	6833	ERR	Backtrace 2: /usr/lib/cgi-bin/nph-zms() [0x8087425]	zm_signal.cpp	98
2015-10-14 14:39:27.428616	zms	6833	ERR	Backtrace 1: [0xb7780410]	zm_signal.cpp	98
2015-10-14 14:39:27.387004	zms	6833	ERR	Backtrace 0: /usr/lib/cgi-bin/nph-zms() [0x80bc922]	zm_signal.cpp	98
2015-10-14 14:39:27.336712	zms	6833	ERR	Signal address is 0xabfb4004, from 0x8087425	zm_signal.cpp	77
2015-10-14 14:39:27.295611	zms	6833	ERR	Got signal 7 (Bus error), crashing	zm_signal.cpp	54
2015-10-14 14:39:27.229581	zms	6833	WAR	Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor Elettra_Bend_S10-2	zm_monitor.cpp	426
2015-10-14 14:39:27.180956	zms	6833	INF	Authenticated user 'admin'	zm_user.cpp	241
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: WEbcam limit

Post by knight-of-ni »

Yep, it's a resource problem:
2015-10-14 14:39:27.295611 zms 6833 ERR Got signal 7 (Bus error), crashing zm_signal.cpp 54
That means you reached the limits of your hardware.

It looks like you've already set the streaming type to mjpeg, rather than h264. That's good.

Here are some other suggestions:
- Verify you've set the frame rate in the camera itself. Leave the MAX fps field in zoneminder empty.
- I think a 4GHz P4 supports SSE instructions. Set your color depth to 32bit to take advantage of this.
- Lower your resolution to 640x480
- ZoneMinder uses /dev/shm, which usually defaults to half you physical RAM. As you add cameras, check to make sure /dev/shm does not get close to 1GB. If it does, you might want to try to increase the max size of dev/shm via your fstab. Note that I don't think this will help due to the type of error you received, but I'd check it anyway.

That's about all you can do. If you are still getting a bus error, then you will need to look into newer hardware. Just about anything you can buy new these days will be faster than what you currently have.
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/
s80ts0465
Posts: 10
Joined: Mon Oct 12, 2015 8:49 pm

Re: WEbcam limit

Post by s80ts0465 »

Ok, I'll try, but I really think to improve the system, buying a new one.
Thanks

Bye
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: WEbcam limit

Post by bbunge »

First, drop your resolution. Start with 640x360 on all monitors and try to add cameras. Go lower if you have to. My guess is you are running out of memory.

bb
s80ts0465
Posts: 10
Joined: Mon Oct 12, 2015 8:49 pm

Re: WEbcam limit

Post by s80ts0465 »

Unfortunately the problem is due to the not enough RAM .
Also with another system with a i5 CPU, but only with 2Gb of RAM I had the same problem.
I solved only after I set the buffer to minimum.

Bye
Locked