I have a webapp using Glassfish v 2.1.1 that hangs regularly.
We have a six instances of a client program that logs in (using vanilla HTTPS) and report status (<1kB) and sometimes upload an image (2MB).
They are connected over a 3G mobile / IP service. It is somewhat unreliable, so sometimes my server reports that a client has given up on an upload, with
org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
Here's the problem: after a while netstat shows lots and lots of TCP connections in ESTABLISHED state. They never go away! Not even after several days. The list just grows and grows. JVM free memory also shrinks. Finally lassfish hangs, and must be restarted.
I *have* made the modifications recommended by J-F Arcand in
http://weblogs.java.net/blog/jfarcand/archive/2007/01/configuring_gri.html
Here's my keep-alive settings (not changed from the defaults, I think):
asadmin get "server*keep-alive.*"
server.http-service.keep-alive.max-connections = 250
server.http-service.keep-alive.thread-count = 1
server.http-service.keep-alive.timeout-in-seconds = 30
Shouldn't broken sockets die immediately?
Shouldn't idle sockets die after 30 seconds?
[Message sent by forum member 'tmpsa' (per.lindberg_at_facilitylabs.com)]
http://forums.java.net/jive/thread.jspa?messageID=390606