[ previous ]
[ Abstract ]
[ Copyright Notice ]
[ Contents ]
[ next ]
Smart Cache Manual
Chapter 10 Current bugs and limitations
Java (at least 1.1 version) caches for security and performance reasons
every DNS response received. This has two negative side
effects:
-
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.
-
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:
-
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.
-
Much better 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.
-
Due to "interesting" (they ignore Authorization: HTTP
header in other protocols than HTTP) password handling in Squid proxy cache,
requesting password protected files in other protocols than HTTP does not work,
when using Squid as parent proxy cache. If you are using Smart Cache only for
HTTP, this does not apply to you. Read as: You can not download
password-protected FTP files.
-
In Java 1.1.7/glib2.1 JVM sometimes crashes in constructor of
java.util.zip.Inflater class. You may turn off auto_compression
and use repair -c -r instead.
-
Socket Linger option doesn't work under OS/2 Warp version 4 with built-in
standard TCP/IP stack (I don't have updated version of OS/2 TCP/IP). Linger
seems to works well under GNU/Linux. If this option does not works, HTTP
clients are not able to detect interrupted transfers (if they has not
Content-size: HTTP/1.0+ header). This is not a problem with WWW
browsers, because user can simply press 'RELOAD' but this is problem for
non-interactive applications, such as WWW-downloaders.
-
There is BUG in standard Java library (at least in JDK 1.1.4, I never notice it
in JDK1.1.7) in
java.text
package. Smart Cache will detect this
and gives you enough information (bad date, which can be used to reproduce the
problem) to send bug report to Sun. This is quite rare, so after i coded
detailed bug report, smart cache doesn't crash. So if you see the crash ->
report it to Sun Microsystems. Stack dump follows (send it also): Line numbers
are important only in java.text package.
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.charAt(String.java:398)
at java.text.DigitList.set(DigitList.java:205)
at java.text.DecimalFormat.format(DecimalFormat.java:305)
at java.text.NumberFormat.format(NumberFormat.java:182)
at java.text.SimpleDateFormat.zeroPaddingNumber(SimpleDateFormat.java:56
9)
at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:548)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:392)
at java.text.DateFormat.format(DateFormat.java:291)
at request.printDate(request.java:763)
at request.make_headers(request.java:666)
at cacheobject.send_fromcache(cacheobject.java:500)
at cacheobject.refresh_object(cacheobject.java:351)
at cacheobject.make_request(cacheobject.java:137)
at mgr.process_request(mgr.java:863)
at httpreq.run(httpreq.java:168)
at java.lang.Thread.run(Thread.java:474)
-
POSTING HTTP 0.9 clients will gets HTTP 1.0 reply instead of old 0.9, which can
confuse them. Many WWW servers do the same. If this apply to you, let me know
and i will correct it.
-
When using CONNECT/SSL, http_proxy is not used and connection is made directly
to target server. Maybe future version will have security_proxy
config keyword. Send me mail, if you need this.
-
Old HTTP 0.9 servers are not supported. There are very rare today.
-
No support for multi-line HTTP headers. I never see it.
-
No support for HTTP/1.1 special caching features. I never see any browser
which use it. Squid proxy cache can handle them, but why implement it when
browsers doesn't use that?
-
No support for content (for example default language select on www.debian.org)
negotiation.
-
access.log don't have real HTTP RC codes or size. Log is written
before request starts.
[ previous ]
[ Abstract ]
[ Copyright Notice ]
[ Contents ]
[ next ]
Smart Cache Manual
0.49.1
Radim Kolar hsn@cybermail.net