Thursday Jan 13, 2011

DPS and slow DNS

Every time a new client connection is treated, one of the tasks done is to log it to the access and connection logs. To log it, the canonical host name is retrieved, probably from the DNS server. If the call to InetAddress.getCanonicalHostName() gets blocked (for instance, because of a slow DNS server or a network problem), the calling Connection Handler Thread will get blocked for some time, preventing the thread from processing the other new connections and reading from the other connections.

In controlled environments, in may be useful to tune java dns caching, by setting the security property networkaddress.cache.ttl to a bigger value, or to -1 (cache forever).

You can't set the value of networkaddress.cache.ttl directly on the command line but you can set the required value in the java.security file located in %JRE%\\lib\\security

networkaddress.cache.ttl=60


  
About


I am Sylvain Duloutre, I work as a Software Architect in the Oracle Directory Integration Team, the customer-facing part of Directory Services & Identity Management Product Development, working on Technical Field Enablement.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
9
10
11
12
13
14
16
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today