In the words of Dr Cathy Ryan, "If you don't write it down, it never happened".
To paraphrase one of my clients, "Every day is a school day".
I do, I learn, I share
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
My blog is PERSONAL, and is a repository of the stuff that I learn, play with, enjoy and want to share.
If you follow one of my tips, your mileage MAY well vary - Here be dragons :-)
Tuesday, 20 December 2011
Slow performance or hang in HostName lookup due to high DNS traffic
Hmmm, this needs to go towards the top of the Very Useful pile - thanks to @IBM_AppServer for sharing via Twitter
There are 2 symptoms you might see:
Calls to the method java.net.InetAddress.getLocalHost takes a long time or the Java™ Virtual Machine (JVM) hangs.
Slow response from the administrative console or from wsadmin command/script.
There are 2 possible causes:
Cause 1: Starting with Java™ 1.4.1, the IP address is not cached by default. This can cause delays and performance degradation if the application relies on this caching mechanism, since a lookup is now performed each time.
The WebSphere Application Server runtime code calls the InetAddress.getLocalHost() method in several places which then causes the DNS lookup requests. Applications making outbound calls would also trigger DNS lookup requests
- OR -
Cause 2: The problem could be lookup issues between IPv6 versus IPv4 in releases of the Java 2 SDK 1.4. The problem may be that the JVM performs both IPv6 and IPv4 queries. If the Domain Name System (DNS) server is not configured to handle IPv6 queries, the application might issue an unknown host exception. If the DNS is not configured to handle IPv6 queries properly, the application must wait for the IPv6 query to time out.
You might also notice that getting the wsadmin command prompt takes a long time or sometimes fails because of the preceding problem.
In addition, there is a known problem in Linux on OS/390 with IPv6 that will lead to a JVM crash. For more details, review the Related information section at the bottom of this technote.