users@glassfish.java.net

Help required to configure the HTTP Service Keep-Alive

From: <glassfish_at_javadesktop.org>
Date: Tue, 13 May 2008 16:13:19 PDT

We had a major issue on a production system after an announcement caused flooding on our server (Glassfish v2ur1-b09d running on JDK1.6). The log files showed:

Caught exception during HTTP processing. java.io.IOException: Too many open files at
sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) at
sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:145) at
com.sun.enterprise.web.connector.grizzly.SelectorThread.handleAccept(SelectorThread.java:1460)

Another post (http://forums.java.net/jive/thread.jspa?messageID=260636&#260636)
indicated a potential issue with keep-lives and time outs. Considering the max connections of our server was set to the default of 256 this was most likely the cause.

What are the implications if we set the max connections to 5000? What impact would this have on memory usage? We are currently allocating 1.5GB on startup but could go higher if needed. After garbage collection our current heap memory is approx 100MB with approx 700MB available.

The thread count is currently set to 1. Do we need to increase this if we set the max connections to 5000?

The timeout is currently set to 30 seconds. Should this also be changed to a lower value (eg 15 seconds?)

Any other suggestions appreciated!

Many thanks in advance for your help.
[Message sent by forum member 'ggierer' (ggierer)]

http://forums.java.net/jive/thread.jspa?messageID=274179