[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ 16 ] [ A ] [ B ] [ next ]


Smart Cache Manual
Chapter 12 - Current bugs and limitations


12.1 Java DNS caching bug/feature

Java (at least 1.1 and 1.2 versions, see notes for Java 1.3 setup) caches for security and performance reasons every DNS response received. This has two negative side effects:

  1. Java never performs garbage collection on it's internal DNS cache. After weeks of continual use of Smart Cache this eats too much memory. It's recommended restart Smart Cache after some time (for example every 3rd day) of continual using to clean internal DNS cache of Java virtual machine.

  1. Java caches every response. DNS servers sends three types of response: Authoritative, Non-Authoritative (cached data) and Server failed. If you are not connected to Internet, you will get server failed responses, because server can't check the DNS name. When Java virtual machine gets this response from operation system, it interprets it as Bad hostname and stores into internal cache. This is implementation bug in current Java versions.

This does not causes any problems if you are always connected to Internet (or at least your DNS server is), but causes problems if you are browsing off line, start a Internet connection and continue to browsing on line. This bug causes that pages on servers, which you visited off line, will not be refreshed and new pages will not be loaded from these servers.

Example session: You start Smart Cache at system boot time. Later you start browsing www.yahoo.com, for example. After some time, you decided to connect to Internet and continue browsing. Smart Cache will report Host Unknown error about www.yahoo.com even if you are connected to Internet.

You can avoid this bug by using one of these solutions:

  1. Best solution is If you are using Java 1.3 add -Dsun.net.inetaddr.ttl=0 option to command line, before word scache.

  1. Restart the cache if you were browsing off line and (after establishing connection to your ISP) then want to browse online. It is not necessary to (re)start Smart Cache if you are connected to Internet - only no off line browsing activity after start is important. Web browser restart is not required.

  1. Good solution is use your ISP's proxy server, which also speed-up the web access speed. Parent (ISP's) proxy is defined in scache.cnf file by directive http_proxy. But this server MUST BE entered using his numeric IP address, not the hostname! This also solves problem with Java's growing DNS caches.

    If you are using hostname, this bug will not be defeated. When SC starts and can not resolve http_proxy hostname (not connected to Internet), http_proxy will be ignored.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ 16 ] [ A ] [ B ] [ next ]


Smart Cache Manual

0.94

Radim Kolar hsn_nospam_at.sendmail.dot.cz