Salut,
glassfish_at_javadesktop.org wrote:
> Hi,
>
> I got confused about these two settings of Glassfish web container.
According to the description of domain.xml
> queue-size-in-bytes(4096) - Specifies the number of outstanding connections an http-listener can have
> max-pending-count(4096) - Specifies the maximum number of pending connections on an http-listener
>
> Does it mean that the web container can handle 8192 requests at the same time?
I have a glance of the source code. It looks like the
queue-size-in-bytes is the size of a linked list which stores request
threads, and the max-pending-count is the backlog of ServerSocket.
>
> Could somebody please tell me a little more about how these two configurations work? What will happen if I set max-pending-count=1 and leave max-pending-count(4096) or vice versa?
You are right with your explanation. The max-pending-count is used by
Grizzly to queue TCP requests before accepting the connection (backlog).
The queue-size-in-bytes is used once the connection has been accepted,
and waiting to be executed because all WorkerThread are busy.
So setting max-pending-count = 1 means 1 request will be serviced at the
time, independently of the number of WorkerThread. I would not touch
that number. I instead recommend you manipulate the
max-queue-size-in-bytes value to increase it if you have heavy traffic,
or reduce it if you want to reduce the number of connected users.
In both case, when the maximum is reached, Grizzly drops the connection.
The main difference is with the max-pending-count, you cannot have any
JMX monitoring information, where the max-queue-size in bytes you can
get statistics like how many were placed in the queue, or many
connection dropped, etc.
Hope that help.
-- Jeanfrancois
>
> Cheers,
> [Message sent by forum member 'jasonw41' (jasonw41)]
>
> http://forums.java.net/jive/thread.jspa?messageID=284939
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>