users@glassfish.java.net

Re: glassfish 3.1.2.2 (build 5) - default install - problem with keeping too many connections in the queue, while system usage is low

From: Mo Maison <momaison_at_yahoo.fr>
Date: Fri, 20 Jul 2012 22:24:09 +0200

Hello,

 From our experiments, I confirm that 1024 files is not sufficient
if your server is under load, probably because of keep-alive
connections.
We got a valuable error message in server log though : something
like 'too many open files' and the server was freezed (did not
answer to requests ; this is not what you observe however).

In case, you may watch the currently opened file descriptors with
something like lsof | grep | wc
or ls /proc/{pid}/fd | wc -l (under linux)

Increasing the ulimit -n to 4096 did not solve our problem.
We had to set the (badly named) parameter "Maximum number of
connections in keep-alive mode" to -1 (or 0 or 1 I don't remember
exactly), so that connections are always closed server-side. This
is not a big concern for our application.

Regards,

   M. Maison


On 19/07/2012 20:34, Mladen Adamovic wrote:
> Hi guys,
>
> I migrated some of my websites from glassfish 2.1 to glassfish 3.1.2.2
> and I'm having problems.
>
> The problem I'm encountering is that after a while, many connections
> wait in connection queue and it even starts to refuse connections, but
> system usage is low.
> #uptime
> 20:28:58 up 51 min, 1 user, load average: 0.09, 0.14, 0.24
>
> If I test the website with #ab -n 1000 -c 5
> http://www.numbeo.com/cost-of-living/
> it gets around 980 failures out of 1000.
> I'm playing with config files, but couldn't figure out where is the problem.
> ulimit -n
> is 1024,cannot rise it, since running in Virtuozzo enviroment.
>