DNS Caching in SAP JVM


The hostname and ip address information are maintained in the JVM's DNS cache. The information on the hostnames for which ip address could not be resolved is maintained in a negative cache. The entries in these caches have the following default time to live:

SAP JVM 6.1:
DNS cache: 30 seconds
DNS negative cache: 10 seconds

SAP JVM 5.1 and 4.1:
DNS cache: Until JVM is restarted (infinite caching)
DNS negative cache: 10 seconds

If a hostname is resolved to a worng ip address due to an error in the DNS or hosts file, the wrong entry will remain there as long as the JVM restarts (in case of 5.1 and 4.1) and 30 sec (in case of 6.1). You can alter this behaviour with the following JVM parameter, which can be configured using the configtool.

-Dsun.net.inetaddr.ttl=<timeout in seconds, 0 means "no caching", -1 means "infinite caching">

You can also change the settings in java.security file located at sapjvm_X/jre/lib/security folder. This file will be overwritten when the JVM is patched. Therefore you need to readjust this parameter or use the JVM parameter described above.

Comments

Popular posts from this blog

OS/DB Migration - CMD. STR, TOC, EXT, R3load, DDLDBS.TPL and more

Fixing Inconsistent Table - Table activation fails due to inconsistency between DD and DB

301 Redirect Using SAP Web Dispatcher