Page 1 of 2

apache crashing after a while when monitoring cameras

Posted: Sun Feb 08, 2009 3:03 pm
by bokusouchi
Hello

the apache server hang/crashes after a while (after 5 mn) when displaying
continuously the picture coming from a camera .

if i restart apache , it works again for about 5 mn and crashes again .

ZM is 1.24 rev 3740

i get those errors in the apache log :

Code: Select all

[code][Sun Feb 08 15:50:14 2009] [error] [client 192.168.4.3] socket_sendto( /tmp/zms-862368s.sock ) failed: No such file or directory, referer: http://venus/index.php?view=watch&mid=13
[Sun Feb 08 15:50:14 2009] [error] [client 192.168.4.3] array (\n  0 => \n  array (\n    'file' => '/var/www/html/ajax/stream.php',\n    'line' => 51,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-862368s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/var/www/html/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/var/www/html/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://venus/index.php?view=watch&mid=13
[Sun Feb 08 15:50:20 2009] [error] [client 192.168.4.3] socket_sendto( /tmp/zms-434994s.sock ) failed: No such file or directory, referer: http://venus/index.php?view=watch&mid=12
[Sun Feb 08 15:50:20 2009] [error] [client 192.168.4.3] array (\n  0 => \n  array (\n    'file' => '/var/www/html/ajax/stream.php',\n    'line' => 51,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-434994s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/var/www/html/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/var/www/html/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://venus/index.php?view=watch&mid=12
[Sun Feb 08 15:50:24 2009] [error] [client 192.168.4.3] socket_sendto( /tmp/zms-862368s.sock ) failed: No such file or directory, referer: http://venus/index.php?view=watch&mid=13
[Sun Feb 08 15:50:24 2009] [error] [client 192.168.4.3] array (\n  0 => \n  array (\n    'file' => '/var/www/html/ajax/stream.php',\n    'line' => 51,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'socket_sendto( /tmp/zms-862368s.sock ) failed: No such file or directory',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/var/www/html/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/var/www/html/ajax/stream.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://venus/index.php?view=watch&mid=13
[Sun Feb 08 16:00:12 2009] [warn] [client 192.168.4.3] Timeout waiting for output from CGI script /var/www/cgi-bin/nph-zms, referer: http://venus/index.php?view=watch&mid=19
[/code]

Posted: Mon Feb 09, 2009 6:23 am
by nuck
Sounds kind of familiar and I seem to remember in that case the ultimate outcome was a ram issue.

yes a RAM issue but....

Posted: Mon Feb 09, 2009 9:49 pm
by timf
I had exactly the same problem and error messages.
In my case I found that running a memory test revealed a crash after a few minutes - but it wasn't actually the RAM's fault.
It was some iffy chinese made capacitors on the motherboard starting to fail which in turn caused RAM errors.
Originally I could run 4G of RAM then 3G then 2G then 1G before the RAM issues occured.
That's to say over a period of time the problem got worse and worse before I finally root caused it.

Check your capacitors and make sure they're not bulging !

Of course you could have a completely different issue giving the same sympton / error message !

PS good work on the Orbit AF pan and tilt - been trying to get mine working for a couple of weeks with no success. So I'll be interested to understand your solution.

Tim

Posted: Thu Feb 12, 2009 11:01 am
by bokusouchi
I was thinking of upgrading Apache and PHP to latest version , and see if it fixes the problem ; but you suggestion is quite sensible , I will run mem86 for a couple of hours tonite . and see how it goes .also check the main board .

As for the ptz module for quickcam orbit , I made some progress .

I will make an official post to the forum , when it is more mature , in the meantime you can get the current version at :
http://localwarp.dyndns.org/QuickcamSphere.pm

it does relative moves , diagonal move , mapped move , and focus control .
reset home , (set preset , and presets do not work )
have a look at the comments in the code , for parameters in the admin interface of ZM .

you need library libwebcam and utility uvcdynctrl from
http://www.quickcamteam.net/software/libwebcam

get the latest svc version of libwebcam .

you also need to set up udev to work with libwebcam (explanations on libwebcam website )

creating a symbolic link to your /dev/videoX device is quite handy
(do it with udev) , this way you can always find your camera no matter which /dev/videoX it gets assigned at boot .

Posted: Thu Feb 12, 2009 2:24 pm
by zoneminder
Thanks for this. I have one of those (if it's the tall ones on the stalks) but it's hooked up to a Windows box. I'll try and give it a go once you have it stable.

Posted: Sat Feb 14, 2009 2:51 am
by tdukes
apache crashing here as well. Its not capacitors and its not ram.

I've gone back to 1.23.3. Too many issues with 1.24.0!!
________
Marijuana bubbler

Check out the apache2 error log....

Posted: Sat Feb 14, 2009 3:13 am
by timf
I had apache2 crashing on me and I had to change from nph-zms to plain zms

Posted: Tue Feb 17, 2009 3:27 pm
by bokusouchi
I checked my ram for 4 hours with mem86 for 4 hours , no errors at all .
I will try the switch from from nph-zms to plain zms .

Posted: Tue Feb 24, 2009 5:59 pm
by jab_doa
Hi,

I experienced the same problem after installing v1.24.1 from Source on Ubuntu 8.04.2 i386 Server. Older versions worked fine. Any solution?

Posted: Tue Feb 24, 2009 7:26 pm
by zoneminder
There is pretty much no difference in the stream generated from a 1.23.3 and 1.24.x zms so I'm not sure why there should be any differences.

What differences there are relate to the establishment of a communications socket to control the stream but this runs entirely outside of apache.

Posted: Thu Feb 26, 2009 2:55 am
by river100
I have that same issue with 1.24, but blamed it on the fact that it was a live cd and not installed. so i didn't check any logs

the web interface would hang and i would do an apache restart to get it going again. this only happened while in montage view, tried
2, 3, and 4 ip cams. same problem.

again this was only running Curtis' new live cd Not installed

i put it on a 4gb usb stick with a 1gb persistent file and same problem.

couldn't say about a hard drive install.

Posted: Fri Feb 27, 2009 4:42 am
by phowarth
A few others have had the same issues discussed in the following thread.

"Apache instances/responsiveness issue...solved" , unfortunately it is not.

I have tried montage view in many different browsers and I get the same problem with apache hanging. Apache seems to open many connections eventually using all available memory and then it hangs.

I have completely uninstalled ZM including the DB and reinstalled with SVN 2791, but still had the same issue. 1.24 works great for me in every other way, but if I use montage view.

I have also gone back to 1.23 and everything is stable again.

Posted: Fri Feb 27, 2009 2:20 pm
by Normando
Me too. Apache hangs.
I have centos 5.2 vitualized.
I will set apache log setting to full, and I will see what happens.

Posted: Sun Mar 01, 2009 2:54 pm
by Fvzzl3
Hey,

if i deactivate the point "RUN_AUDIT" in my configuration, apache does not hang.

same result for you?

Posted: Tue Mar 03, 2009 2:54 pm
by freak
I'm getting the "Timeout waiting for output from CGI script /usr/lib/cgi-bin/nph-zms," error too. 1.23.3 never showed this problem. I think it is a 1.24 problem.