Apache hangs when viewing live stream

Forum for questions and support relating to the 1.24.x releases only.
Locked
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Apache hangs when viewing live stream

Post by maciekc »

Hi!

I have SVN 2780.
When I open live monitor view it hangs after a while(about few minutes). It hangs faster when it has greater framerate.
When it hangs the displayed fps value in window is less than 0
For example it shows:

Code: Select all

State: Alarm - -125.11 fps
I also enabled debug log.
The output looks like stopped in a moment(there is end of the message missing)

Code: Select all

02/20/09 12:43:39.947578 zms[18997].DB3-zm_stream.cpp/138 [Dis
When I open zms directly with that html page:

Code: Select all

<img id="liveStream" src="http://127.0.0.1/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=25&buffer=1000&connkey=902319&rand=1235126997" alt="New" width="640" height="480"/>
There is no problem it won't hang.

The problem also exist when I use lighttpd instead of apache.
There is no difference between zms and nph-zms.

When it is hanged, I'm unable to get any page on webserver.

Let me know if there is some info I can provide to help solve the problem.
It looks like there is some problem updating status in monitor view page.
szimszon
Posts: 26
Joined: Mon Nov 27, 2006 8:41 pm

Post by szimszon »

It's the same issue like my on http://www.zoneminder.com/forums/viewto ... c&start=15 (Posted: Sun Feb 08, 2009 11:00 am Post subject: zms err got big negative fps at jpeg live streaming)

Not solved yet.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

If you look in your syslog do you see zms being killed at all? To compare, just start a stream and then end it and you should see zms getting a TERM signal.

The normal watch stream also has ajax calls to update the frame rate and events etc. If you go into about:config in FireFox and filter on network.http do you have high enough values in the max connections and max connections per server for all the connections that might be open?
Phil
szimszon
Posts: 26
Joined: Mon Nov 27, 2006 8:41 pm

Post by szimszon »

zoneminder wrote:If you look in your syslog do you see zms being killed at all? To compare, just start a stream and then end it and you should see zms getting a TERM signal.
No. I think it dies on some timeout...
zoneminder wrote: The normal watch stream also has ajax calls to update the frame rate and events etc. If you go into about:config in FireFox and filter on network.http do you have high enough values in the max connections and max connections per server for all the connections that might be open?
I'll check it...
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

zoneminder wrote:If you look in your syslog do you see zms being killed at all? To compare, just start a stream and then end it and you should see zms getting a TERM signal.
zms is not being killed. No additional info in syslog. It keeps running forever. And the last message in its debug log is written only partially.
When starting stream and closing it, zms is closed correctly.
The normal watch stream also has ajax calls to update the frame rate and events etc. If you go into about:config in FireFox and filter on network.http do you have high enough values in the max connections and max connections per server for all the connections that might be open?
I have 15 per server and 30 all connections, so it should be OK, when viewing just one camera.
When I close firefox and start it again it is working back, but stalled zms keeps running. After restarting apache it is killed.

Maybe it is some memory synchronization problem? I looked into source but couldn't figure out how it is exactly working.
---
UPDATE

It hangs with opera+cambozola too.
dinyasoft
Posts: 13
Joined: Mon Dec 24, 2007 8:31 pm
Location: Russia, Veliky Novgorod.
Contact:

Post by dinyasoft »

I have a similar problem. But it show up in a montage mode. After a few minutes the server stopping responding. From other computer during the same time all OK.
May be its browser trouble only?
szimszon
Posts: 26
Joined: Mon Nov 27, 2006 8:41 pm

Post by szimszon »

Now I have the latest ffmpeg (17530) and zoneminder (2785). The problem is still persistent.

It seems to me that mode=mpeg isn't affected.

Hm...

Code: Select all

wget  --no-check-certificate "https://192.168.55.2/zm-cgi-bin/zms?mode=jpeg&monitor=1&scale=50&bitrate=75000&maxfps=10" -O /dev/null
is do the job. I downloaded 330,400,317byte and still downloading... Anyway it could be something with syncronizing with a web browser. Write to /dev/null is fast :) Or there is something in the stream what renders the browser unresponsive...
szimszon
Posts: 26
Joined: Mon Nov 27, 2006 8:41 pm

Post by szimszon »

It seems to me that's some kind of firefox3.1b... issue.

I checked with ff2 but I can't reproduce the trouble - so far.

The problem isn't with the live stream itself but somewhat with additional information fetched with ajax and ff3... I think. :(
Locked