From: David B. <d.b...@ma...> - 2000-07-25 23:07:23
|
There seem to have been a few people interested in either reconnecting on time-outs, or getting past search-limits...both of which are optionally imposed by the server. Since it's clear that Graham et al think it shouldn't be part of the library, rather a function of the application, does anyone who's done this sort of thing have sample code that they'd like to share...perhaps it could be added to the as-yet-nonexistant-but-hopefully-soon-going-to-be FAQ.?? David. At 04:20 PM 7/25/00 -0500, Mark Wilcox wrote: >Net::LDAP should only attempt to connect once. To reconect its up to the >application. > >Mark > >On Tue, 25 Jul 2000, 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. >> >> Is it possible with Net::LDAP to specify reconnect attempts if the ldap >> server goes away (with appropriate limits on time between attempts and >> on the total number of attmepts to connect)? >> >> Any help would be greatly appreciated. >> >> Bing >> >> > > > > -------------------------------------------------------------------- David Bussenschutt Email: D.B...@ma... Senior Computing Support Officer & Systems Administrator/Programmer Location: Griffith University. Information Technology Services Brisbane Qld. Aust. (TEN bldg. rm 1.33) Ph:(07)38757079 -------------------------------------------------------------------- |