Problems when 2 people are watching live

Forum for questions and support relating to the 1.28.x releases only.
Post Reply
advbug
Posts: 14
Joined: Thu Oct 16, 2014 8:41 am

Problems when 2 people are watching live

Post by advbug » Sun Aug 30, 2015 10:02 am

Hi,

I am running Zoneminder 1.28.100 now and I am very pleased with this version! It runs really nice, except my problem: When only I watch the live stream on single monitors or montage, everything is ok. When 2 people watch or I have the montage open and click on a monitor to see full screen, nothing happens and I only get the "broken image" symbol in my browser. Sometimes I get the message "waiting for free socket".

It seems that the simultaneous connections from zoneminder or apache2 need to be increased?! Currently I have 7 FullHD cameras running, on montage most times only 6 cameras show up at the same time, but all are working properly.

What can I do?


Thanks in advance! :)

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

Re: Problems when 2 people are watching live

Post by bbunge » Sun Aug 30, 2015 3:34 pm

Could be a MySQL issue. Try increasing the max connections. Could also be a buffer pool size. Try installing mysqltuner and running it to see what needs to be changed, Could also be a low memory problem. Without getting into a lot of details, Linux distros like Debian and Ubuntu use half of the RAM for a RAM disk. You could set this RAM disk to use less memory and/or move some processes like PATH_SWAP into the RAM disk.

advbug
Posts: 14
Joined: Thu Oct 16, 2014 8:41 am

Re: Problems when 2 people are watching live

Post by advbug » Sun Aug 30, 2015 8:37 pm

Hi, thanks for the response.

I am running Ubuntu,

Code: Select all

Linux ZM 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
with an i3 and 8GB RAM. For testing I had it running with more cameras, so I don't think memory is the issue, because normally when there is not enough zoneminder doesn't work properly with the additional cameras. For example, I had a 1.25.0 running with 7 cameras (FullHD) fine on 4GB RAM, but when I added the 8. camera, it wouldn't come up and show a picture. Only when I added more memory, everything worked fine.

MySQL max connections was at 151, I increased it for testing, but no difference.

User avatar
asker
Posts: 1411
Joined: Sun Mar 01, 2015 12:12 pm

Re: Problems when 2 people are watching live

Post by asker » Sun Aug 30, 2015 10:29 pm

You need to post detailed ZM logs, browser information, ZM installation procedure (package, source etc), browser you are using, OS

Edit: just noticed your "waiting for free socket"

Seems to be a browser issue. If you are using, Chrome, I believe it allows 6 concurrent open TCP connections to the same domain.

To isolate the problem, first try with Firefox
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

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

Re: Problems when 2 people are watching live

Post by bbunge » Mon Aug 31, 2015 12:28 am

Firefox can have problems with montage view. There is a fix listed in the WIKI but here it is so you do not have to search for it:

Enter about:config in the address bar

scroll down to
browser.cache.check_doc_frequency 3
change the 3 to a 1

browser.cache.disk.enable True -> False
network.http.max-connections-per-server -> put a value of 100
network.http.max-persistent-connections-per-proxy -> 100 again
network.http.max-persistent-connections-per-server -> 100 again

advbug
Posts: 14
Joined: Thu Oct 16, 2014 8:41 am

Re: Problems when 2 people are watching live

Post by advbug » Mon Sep 21, 2015 5:29 am

Hi,

After a lot of testing I am sure it's not a browser issue. Even when having 2 computers watch a single live stream I get problems. The logfiles just tell me a lot of rtsp errors, but this is "normal"... (error decoding frame, etc)

Just now I am sitting on my PC and on my Laptop trying just simple things but ZM seems to stop working for a couple of seconds if 2 or more users are connecting to it. My Laptop was just refreshing the index page and my PC was loading the logfiles, suddenly nothing worked anymore. After about 30 seconds ZM was responsive again and showed my monitors all red.

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

Re: Problems when 2 people are watching live

Post by bbunge » Tue Sep 22, 2015 1:23 am

Likely not your hardware. I have a Core2 Quad, 2.66 GHZ, 8 GIG RAM running 17 cameras on mocord. Granted I have the resolution on the cameras turned way down but it is good enough for my customer.

As I wrote earlier, run mysqltuner to see if there is something you need to change in MySQL.

Go over the install procedure @ http://www.zoneminder.com/wiki/index.ph ... e_easy_way

Turn the resolution down to see if you can get it to work!

Reinstall using http://www.zoneminder.com/wiki/index.ph ... e_easy_way

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

Re: Problems when 2 people are watching live

Post by knight-of-ni » Wed Sep 23, 2015 12:37 pm

The machine is bottlenecking somewhere. I doubt it has anything directly to do with 2 users.
That just happens to be where the problem manifests itself based on your current load.

Do what bbunge said and use mysqltuner to tune your database engine.

What's missing from this thread is the frame rate you've got your HD cameras running at.
If they are all at 30 fps, then disk i/o is likely the problem. Turn your frame rate down to something more normal, like ~5 fps.
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/

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests