Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

timeout in Net:::DNS

timeout in Net:::DNS

timeout in Net:::DNS

Hi everyone.

I am using Perl and the module Net::DNS for performing a zone transfer.
My problem is that I create a resolver object that seems to ignore the "timeout" parameter I set.

I put the code here:


#!/usr/bin/perl -w

use Net::DNS ;

    my $res = new Net::DNS::Resolver;

    $res->tcp_timeout (1) ;
    $res->retry (1) ;
    $res->retrans (1) ;
    print "before transfer" ;
    print "timeout: ", $res->tcp_timeout, "\n" ;
    print " retrys: ", $res->retry, "\n";
    print " retrans: ", $res->retrans, "\n";
    my @records = $res->axfr("uy.");
    foreach (@records) {
        $_->print ;
    print "after transfer " ;


The programs works well when the nameserver works well, but the nameserver "UUCP-GW-2.PA.DEC.COM" sometimes works but sometimes delays a long time.
I want the resolver to wait no more than 1 second, retry 1 time and wait 1 second before retrys..
The "prints" do print the right values (1, 1, 1), but after printing "retrans" the program delays for some minutes...

Thank you..

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close