Page 1 of 1
reconnecting Ip Cam
Posted: Thu Jun 08, 2006 8:17 am
by picard71
Hi to all
I'm a beginner in using zoneminder and I meet a problem:
I have an Ip Cam in record mode.
I physically disconnect it.
I reconnect after some hour and zma and zmc processes take many minutes to run again.
Is there any parameter that I can change to restart zma and zmc more quickly ?
Posted: Thu Jun 08, 2006 8:40 am
by jameswilson
not that i know to but rather than continually restart the zmc, we could use a sepertae process to try and get a http response from the ip & port number and every say 30 seconds, when a response was recieved we could restart that monitor? I dont know how to achieve this maybe a nagios script
Posted: Thu Jun 08, 2006 1:55 pm
by erasokamotesk
totally agreed with you
Posted: Thu Jun 08, 2006 3:49 pm
by Eklectick
Could this help?
It is already implemented in recent versions, I do not remember since what version Phil got it in there but perhaps this could help. It is an option in the System tab of the configuration with a default value of 5 minutes, before there was an option, I belive it took about 15 minutes before restart.
Code: Select all
ZM_WATCH_MAX_DELAY
The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines the maximum delay we will allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above.
Regards!
Posted: Thu Jun 08, 2006 4:07 pm
by jameswilson
yeah thats the option but im unsure what load and log info etc it would generate if it just blindly tried to reconnect when its going to fail. Phil will have set the default for a reason i would think
Posted: Fri Jun 09, 2006 7:06 am
by picard71
I have changed ZM_WATCH_MAX_DELAY : it was 30 min!!
I resolved my problem setting it to 5 min...
thx to all !!
Posted: Fri Jun 09, 2006 11:41 am
by zoneminder
I think the original problem was a result of ZM trying to restart processes when the camera is disconnected. If this fails (because they can't connect to the cam) then they will be queued to be restarted after a delay. This delay increases with each subsequent failure until it hits ZM_MAX_RESTART_DELAY seconds. This is to stop a machine getting swaped with continuous attempts to restart processes. Once this maximum value is hit then the restart attaempts take place only at these intervals. So no matter when you plug your cam in it may be up to this time before ZM notices.