Page 1 of 1
Apache hangs when viewing live stream
Posted: Fri Feb 20, 2009 11:53 am
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:
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.
Posted: Fri Feb 20, 2009 12:47 pm
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.
Posted: Fri Feb 20, 2009 1:29 pm
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?
Posted: Fri Feb 20, 2009 1:40 pm
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...
Posted: Fri Feb 20, 2009 1:51 pm
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.
Posted: Fri Feb 20, 2009 2:58 pm
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?
Posted: Sun Feb 22, 2009 9:02 pm
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...
Posted: Tue Mar 10, 2009 9:31 am
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.