Socket::gethostbyname does reverse DNS lookup for IP address and is slow if no 
DNS reverse lookup reply is received
-------------------------------------------------------------------------------------------------------------------

                 Key: JRUBY-3812
                 URL: http://jira.codehaus.org/browse/JRUBY-3812
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.3.1
            Reporter: Raimonds Simanovskis


Socket::gethostbyname(host_name) finds IP address of host_name and then does 
reverse DNS lookup for IP address (was traced down using tcpdump on Mac OS X).
If DNS server is not returning reverse DNS name for IP adress, then this method 
on Mac OS X took about 20 seconds.

Discussed with headius on IRC and here are potential reasons:
headius:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6413593
headius: it seems that it's not our call to getByName, but a subsequent call to 
getCanonicalHostName that does it

On MRI it is not doing reverse DNS lookup and always is very fast.

Socket::gethostbyname(Socket::gethostname) call is used in DataObjects drivers 
and as a result on some machines loading DataObjects JDBC driver could take 
very long time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to