From: Chris R. <Chr...@me...> - 2000-07-26 11:30:36
|
On Tue, 25 Jul 2000 16:11:09 CDT, "Bing Du" wrote: > Greetings all... > > I have a client script to do routine mass search and update on our ldap > server. The script is set up to run at 1:30am in a crontab file and > usually it takes about 5 hours to finish its work. All the script's > activities are recorded in a log file. > > One day lately, I noticed in the log file that the script started at > the designated time (1:30am). But an error message 'I/O Error > Connection reset by peer' on a search showed up at about 10:30am (about > 10 hours later). > > Was it because I did not set up any timelimit on 'new'ing a connection > and search()? > > According to 'perldoc Net::LDAP', if not set explicitly, the default is > 120 (I assume the unit is second) will be used as the value of timeout > in the following operation. > > $ld = new Net::LDAP($ldap_server,port => $ldap_port) || die "Can't > connect!!!"; > > Also timelimit can be set in search(). If not set, the default is no > limit. Timelimits are not relevant when creating a new connection as there's no LDAP protocol going on at this point, just TCP connection establishment. Normal TCP timers should apply here. In LDAP, sizelimits and timelimits are only specified in the search operation - no other operations use them (ie send them to the server.) Cheers, Chris |