users@glassfish.java.net

Re: glassfish 3.1.1, VPS (max sockets 1024 + 1024 local sockets), config suggestions to avoid Too many open files problem

From: Mladen Adamovic <mladen.adamovic_at_gmail.com>
Date: Mon, 23 Jul 2012 21:13:02 +0200

On Mon, Jul 23, 2012 at 7:30 PM, Oleksiy Stashok <oleksiy.stashok_at_oracle.com
> wrote:

> the changes from default config I have increased http-thread-count to 300
> (with default number 8 problems with accepting connection
> were immediately evident, although not too many open files problem was
> evident in the log) and also added MySQL connection polling to avoid
> problem with many connections in TIME_WAIT state, see
> http://lists.mysql.com/java/6586
>
> That's strange, if average processing time is 3ms, 8 threads should be
> more than enough... if i'm not missing anything obvious here.
>
>
I think that perhaps, the average processing time doesn't take into account
the time it waits for connections or stalled time. Think about keep alive
connections.
Normally, I could see 80 active keep alive connections.
When keep alive connection pulls a request, one RTT is needed until next
command is received over the same connection, so between requests it can be
300ms waiting time for RTT.
And if all keep alive connections are in the queue, the server might wait
for RTT in all 8 threads processing keep alive connections.
At the same time queue is getting overloaded with connections... If I'm not
missing anything different here?


> It might be related to the socket linger timeout, pls. check what's the
> default linger value for your env.
>
> http://stackoverflow.com/questions/9563496/how-do-i-find-out-the-jre-default-linger-on-close-time-out-value
>
>
It shows: Socket.getLinger() = -1


Hm, I've seen one problem with the Virtuozzo server in the log:
quotaugidlimit
Number of user/group IDs allowed for the Container internal disk quota. If
set to 0, UID/GID quota will not be enabled.

This is set to limit 2000, but I don't understand what it has with files,
it shall be number of UID/GIDs, and at the moment is has been steady at 43
at VPS.
Perhaps these are problem with Virtuozzo setup but it has to be proven
somehow.



-- 
Mladen Adamovic
Numbeo
Drziceva 9, 11120 Belgrade-Zvezdara, Serbia
(Business Registration Number 62612240)
Tel. +381-66-058-595
email: mladen.adamovic_at_gmail.com
web: http://www.numbeo.com