Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.3.1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
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.