Page 2 of 5

Posted: Tue Mar 24, 2009 8:12 am
by c0mputerking
Hello again lonewolf i still get the occasional camera freeze up in montage, but it is much better than before. Cameras seem to only freeze inside the montage screen, and zoneminder is still ok ie i can close and open single cameras including the one that seems frozen in montage. Also i can watch events and do all the stuff i used to be able to do in 1.23.3 without freeze ups. Very nice work

When i get a frozen camera or 2 in the montage screen it seems to corospond with this error that gets repeated over and over until i close montage. It also seems to be linked to an error i get with my ip camera during montage. However i am testing the montage to see if it will freeze without the ip camera included.

==> /var/log/messages.log <Mar>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 '' => '/var/lib/zm/www/ajax/stream.php',
Mar 24 01:47:16 1 'line' => 51,
Mar 24 01:47:16 1 'function' => 'ajaxError',
Mar 24 01:47:16 1 'args' =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 0 => 'socket_sendto( /var/lib/zm/socks/zms-760786s.sock ) failed: Connection refused',
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 1 =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 'file' => '/var/lib/zm/www/index.php',
Mar 24 01:47:16 1 'line' => 116,
Mar 24 01:47:16 1 'args' =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 0 => '/var/lib/zm/www/ajax/stream.php',
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 'function' => 'require_once',
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 )
Mar 24 01:47:16 1 httpd: socket_sendto( /var/lib/zm/socks/zms-732904s.sock ) failed: No such file or directory
Mar 24 01:47:16 1 httpd: array (
Mar 24 01:47:16 1 0 =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 'file' => '/var/lib/zm/www/ajax/stream.php',
Mar 24 01:47:16 1 'line' => 51,
Mar 24 01:47:16 1 'function' => 'ajaxError',
Mar 24 01:47:16 1 'args' =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 0 => 'socket_sendto( /var/lib/zm/socks/zms-732904s.sock ) failed: No such file or directory',
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 1 =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 'file' => '/var/lib/zm/www/index.php',
Mar 24 01:47:16 1 'line' => 116,
Mar 24 01:47:16 1 'args' =>
Mar 24 01:47:16 1 array (
Mar 24 01:47:16 1 0 => '/var/lib/zm/www/ajax/stream.php',
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 'function' => 'require_once',
Mar 24 01:47:16 1 ),
Mar 24 01:47:16 1 )

Posted: Sat Mar 28, 2009 9:05 pm
by newvisionantenna
donnie-gg

Thanks for the heads up on that. I went and checked and everything was running fine, I didn't reboot or restart anything so I'm not sure what or why it wouldn't let you in. Hopefully you get my email so we can dial in on what's happening here. I will mark down all fixes I apply from the forum here so we can see what resolves this. I've yet to make any changes yet so I'll try and do the 1-2 things mentioned about apache and the ajax file first and see what that gets.

I just don't understand why I had no issue getting back in when you said it was all frozen. I'm going to pull up a montage view of the two feeds on there now and see how long it goes.

Posted: Sat Mar 28, 2009 10:06 pm
by newvisionantenna
I'm now going on 20 minutes of the montage view being open with IE7 and no crash or lockup. I have made no changes yet. There is no telling how many people are viewing my demo at any given time, but so far it's working just fine for me.

edit: going on 30 minutes and I'm logged in what a super admin account I made. The only thing I see differnet then default is I have it set on high bandwidth and the montage is set for 3 wide grid, scaled, enlarge on alarm. I'll log out and log in as admin next and see if I have different settings on that account.

edit: at about 40 minutes my montage view stopped. I can't say for sure if it was zoneminder or my wireless connection here and the fact I'm connecting half way around the world with this crap connection. I still have the montage view up with it stopped but I can get into zoneminder with no problem. I also clicked one monitor and the stream came up fine so apache2 and zoneminder is still working fine.

edit again: I've now be going another 20 minutes using the mpeg option under images tab. I'm using IE7 and the montage view with the same settings. I'll see how long it makes it using this way instead of jpeg.

Posted: Sat Mar 28, 2009 10:59 pm
by c0mputerking
How many cameras do you have? what type of interface? I have 8 here running through an 8 chip bttv card from bluecherry

ps i did not get a chance to set up your dvd yet and have to go to my real job for a bit now. Maybe when i get back?

Posted: Sat Mar 28, 2009 11:08 pm
by newvisionantenna
I have two Axis IP camers attached to a remote VPS server running my setup. I selected the option under zoneminder image tab for mpeg. It's now more then 30 mins and no freezing. Even when the video stopped streaming earlier in the montage view I could still select each monitor and see the video or restart the montage, so I've yet to see it fail completly. That was using the jpeg option. There is no telling how many people are viewing my demo so even if it locked up I wouldn't know if it's zoneminder or just an overload a people.

Posted: Sat Mar 28, 2009 11:27 pm
by newvisionantenna
It's been one hour now and no hiccups whatsoever. You would never beleive how I'm connecting to my remote serve with wireless at the moment, honesly I should not have internet at the moment, but thanks to my handy dandy modded router I carry with me I'm good to go :)

So it seems like mpeg option is better then jpeg? Maybe jpeg is fine and at the 40 minute mark earlier I had a quick disconnect. Either way I've yet to have apache2 or zoneminder lock up on me. I have someone else trying to connect to my server with problems, but it's sound like a browser issue. I'll lock down the server and issue a user name and password if someone has time ot let montage sit open for a really really long time and know they are the only one connected.

edit: I set there for over an hour and had no issues using the mpeg option for viewing the montage view with the settings I mentioned. I don't have the time to watch it any longer, but i'm convinced either my dvd works fine, the vps is fine, or mpeg option is fixing something.

this doesnt solve it !

Posted: Fri Apr 10, 2009 1:21 pm
by mgg
lonewolf wrote:Ok, here's the deal:

There is a race condition in ajax/stream.php in which if the connection is closed after the socket_sendto() call but before the response is received (sometime during the socket_select() call), socket_select() returns 0 (not FALSE) which is not handled and so it allows socket_recvfrom() to be called. This then blocks indefinitely while waiting for a response which is never going to come as the other end of the socket is already closed.

To fix: on or about line 60 in ajax/stream.php change

Code: Select all

if ( $numSockets === false )
to

Code: Select all

if ( $numSockets === false || $numSockets < 1 )
/LW

tried that with no success :(
I'll try and older firefox 2.0.4.
It seems to work ok with IE .

Anyone have any other ideas ?

Thanks

Igor

Posted: Fri Apr 10, 2009 7:13 pm
by c0mputerking

Posted: Sat Apr 11, 2009 9:31 pm
by kingofkya
this helped my zm box but i really think there is a deeper problem just out of curiosity do you guys run you am boxes at almost max cpu

Posted: Sat Apr 11, 2009 9:56 pm
by lonewolf
kingofkya wrote:just out of curiosity do you guys run you am boxes at almost max cpu
I was when I was having major iowait issues, but after moving ZM's storage onto a dedicated array I'm at less then half with 9 IP cameras in record mode at 640x480 ~10 fps.

/LW

Posted: Sun Apr 12, 2009 6:50 am
by c0mputerking
lonewolf wrote:
kingofkya wrote:just out of curiosity do you guys run you am boxes at almost max cpu
I was when I was having major iowait issues, but after moving ZM's storage onto a dedicated array I'm at less then half with 9 IP cameras in record mode at 640x480 ~10 fps.

/LW
Do you still get ajax errors? 9 cams 640X480 sounds like alot of hardware give us some details or point me to a post if i missed your description. Obliviously you are serious about things as am i lets here the entire tail.

I have 8 analog cams on a 500GB raid 1 array disk IO does not really seem to be an issue. However i am about to move to 2.5" disks and have some reserve about this.

Posted: Tue Apr 14, 2009 8:57 pm
by henriquejf
lonewolf wrote:Ok, here's the deal:

There is a race condition in ajax/stream.php in which if the connection is closed after the socket_sendto() call but before the response is received (sometime during the socket_select() call), socket_select() returns 0 (not FALSE) which is not handled and so it allows socket_recvfrom() to be called. This then blocks indefinitely while waiting for a response which is never going to come as the other end of the socket is already closed.

To fix: on or about line 60 in ajax/stream.php change

Code: Select all

if ( $numSockets === false )
to

Code: Select all

if ( $numSockets === false || $numSockets < 1 )
/LW



Well, for my ubuntu 8.10 and zm 1.24.1 from SVN following the excelent guide on

http://www.zoneminder.com/wiki/index.ph ... ozola-0.7)

I have the same issues regarding apache freezes; I can add that i HAD these problems with 1.23.x also, and it only happens on external access (WAN); using a desktop in the zm box i dont experience that at all;

The fix quoted above seemed to help a little, but not completely, unfortunately;

Message c0mputerking Joined: 16 Sep 2008 Posts: 147 Po

Posted: Wed Apr 15, 2009 5:27 pm
by rony000
n in ajax/stream.php in which if the connection is closed after the socket_sendto() call but before the response is received (sometime during the socket_select() call), socket_select() returns 0 (not FALSE) which is not handled and so it allows socket_recvfrom() to be called. This then blocks indefinitely while waiting for a response which is never going to come as the other end of the socket is already closed.

Posted: Thu Apr 23, 2009 2:42 pm
by henriquejf
-null-

Posted: Thu Apr 23, 2009 2:45 pm
by henriquejf
-null post, trying to delete-