Page 1 of 1

Slave question

Posted: Thu May 06, 2004 1:26 am
by dave
Thanks to Phil for the excellent software and resources -- I'll be sending a donation soon. I've been using it since last year and it has also been a valuable learning experience. And thanks to Ross for making things easier and faster to set up with the live cd. I recently installed 1.19.1 livecd on one machine on my lan, no problems. Then I installed a "slave" machine with same software and moved a camera from the "master" machine to distribute the load a bit. I am still not getting a remote feed from the slave machine, but when I try to access the remote feed from any computer in my (home) lan several instances of httpd2 start up on the slave. I can make them go away by changing the "Function" setting for the remote feed on the master computer from "monitor" to "none". Also, the httpd access and error logs on the slave grow to about 600 MB EACH in about a day's time.

top - 01:56:00 up 22 min, 0 users, load average: 2.50, 2.32, 1.29
Tasks: 91 total, 2 running, 89 sleeping, 0 stopped, 0 zombie
Cpu(s): 89.8% us, 6.9% sy, 0.0% ni, 2.7% id, 0.0% wa, 0.3% hi, 0.3% si
Mem: 321008k total, 290732k used, 30276k free, 11132k buffers
Swap: 655348k total, 0k used, 655348k free, 143060k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2361 apache 16 0 12088 8092 8660 S 9.0 2.5 0:12.42 httpd2
1890 apache 16 0 12332 8268 8660 R 8.7 2.6 0:45.41 httpd2
1888 apache 16 0 12088 8016 8660 S 7.5 2.5 0:55.80 httpd2
1889 apache 16 0 12088 8072 8660 S 7.5 2.5 0:55.35 httpd2
2373 apache 16 0 12088 8080 8660 S 7.5 2.5 0:05.99 httpd2
2403 apache 16 0 12088 8016 8660 S 7.5 2.5 0:05.16 httpd2
1886 apache 16 0 12088 8088 8660 S 7.2 2.5 0:55.01 httpd2
2323 apache 16 0 12088 8068 8660 S 7.2 2.5 0:51.68 httpd2
2325 apache 16 0 12088 8072 8660 S 7.2 2.5 0:45.85 httpd2
2381 apache 16 0 12088 8016 8660 S 7.2 2.5 0:07.88 httpd2
2401 apache 16 0 12088 8016 8660 S 7.2 2.5 0:05.43 httpd2
2217 apache 15 0 86604 9152 11m S 3.2 2.9 0:38.16 zmc
1243 root 15 0 63144 11m 52m S 0.9 3.7 0:23.82 X
2250 user 16 0 27492 15m 25m S 0.9 5.0 0:07.09 kdeinit
2352 user 16 0 2172 1048 1964 R 0.6 0.3 0:01.79 top

From httpd error_log:

[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100
[Tue May 04 23:44:27 2004] [error] [client 192.168.0.103] client denied by serve
r configuration: proxy:http://192.168.0.100/zm/index.php?view= ... ode=stream&
mid=1&scale=100


Any insight on why so many (sometimes 12 or more) occurrences of httpd2 exist would be very welcome.

Posted: Thu May 06, 2004 10:07 am
by zoneminder
Hi Dave,

I'm not sure what the 'client denied by server configuration' error means though I suspect you could google for it and find out easily enough. I imagine it's related to some apache config somewhere.

However the large numbers of servers is not unusual and is by design. For instance on one of my servers the httpd.conf lists this

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>


which basically means it will always start at least 8 servers, and will try to keep 5 spare up to a maximum of 20. So if there were 6 connections there would be 11 servers running, the original 8 plus 3 new ones to make sure that 5 were still available.

It may be your config does the same, as this isn't something I've changed myself. However I would suggest trying to remove the error first as this may also be having some impact.

Phil,