Apache NOT responding
-
- Posts: 190
- Joined: Tue Sep 16, 2008 5:22 am
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 )
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 )
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
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.
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.
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
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.
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.
-
- Posts: 190
- Joined: Tue Sep 16, 2008 5:22 am
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
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.
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
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.
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 !
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 changetoCode: Select all
if ( $numSockets === false )
/LWCode: Select all
if ( $numSockets === false || $numSockets < 1 )
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
-
- Posts: 190
- Joined: Tue Sep 16, 2008 5:22 am
You should follow along with post http://www.zoneminder.com/forums/viewtopic.php?t=13400
-
- Posts: 190
- Joined: Tue Sep 16, 2008 5:22 am
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.lonewolf wrote: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.kingofkya wrote:just out of curiosity do you guys run you am boxes at almost max cpu
/LW
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.
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
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 changetoCode: Select all
if ( $numSockets === false )
/LWCode: Select all
if ( $numSockets === false || $numSockets < 1 )
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;
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Message c0mputerking Joined: 16 Sep 2008 Posts: 147 Po
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.
rony
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
-null-
Last edited by henriquejf on Thu Apr 23, 2009 2:50 pm, edited 1 time in total.
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
- henriquejf
- Posts: 77
- Joined: Tue Feb 10, 2009 12:01 pm
- Location: Brazil
-null post, trying to delete-
Last edited by henriquejf on Thu Apr 23, 2009 2:51 pm, edited 1 time in total.
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil