Java™ virtual machine (JVM™) caches IP addresses and ignores DNS changes
 Technote (FAQ)
 
Problem
The JVM can indefinitely cache IP addresses that are accessed within an application running on WebSphere® Application Server v4.0 and v5.0 releases. This causes a problem in specific cases when a domain name server (DNS) entry is changed and the application continues to attempt to access the previous IP of a DNS entry. The cache is only refreshed on the restart of the Application Server JVM.
 
Cause
A cached IP address is only refreshed during JVM startup so a Web application can potentially use an outdated cached IP address.
 
Solution
You can set a parameter to give a refresh rate for this cache:
sun.net.inetaddr.ttl=time_in_seconds

After the specified number of seconds has passed, the cache is refreshed and picks up any changes made to the DNS, so an application can go to the correct IP.

Add this parameter as a command line property by preceding it with a "-D" on the Application Server running the application in question.

For WebSphere Application Server v4.0 releases:
JVM Settings -> Advance JVM Settings -> Command line arguments

For WebSphere Application Server v5.0 releases:
Application Servers -> Servername -> Process Definition -> Java Virtual Machine -> Generic JVM Arguments for 5.0

*This documentation is for the Developer Kit, Java Technology Edition V1.4, but most of these instructions apply to V1.3.0 and V1.3.1 as well.

See the Sun documentation regarding these properties under the Related information section for additional information.
 
Related information
Sun documentation
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java SDK
Operating system(s): HP-UX
Software version: 4.0.7
Software edition:
Reference #: 1082994
IBM Group: Software Group
Modified date: Aug 2, 2004