milad.j
Hi,
we have faced a problem when our number of clients increased the server doesn't accept new connections,
we changed heap size to 4 Gb
then the problem solved for a while but it happened again
and after changing heap size to 8 Gb server state becomes normal
but i have a question, is it a good practice to increase heap size? if not what should we do? and what is the best practice?
Thanks
Dario Crivelli
If the overall activity of the Server increases, enlarging the heap may even be necessary, as each connection and session requires some memory.
On the other hand, abnormal heap usage may be the consequence of other undesired conditions that should be detected and fixed with proper configuration; for instance, clients that are allowed to subscribe to many items in an unfiltered mode, but then consume the updates slowly, would cause the Server to enqueue their updates.
We cannot estimate how much memory is needed for a specified number of connections and sessions, since, as shown above, many other usage characteristics are involved in the relation.
Fortunately, if the heap is indeed the current bottleneck, this can be directly investigated by keeping the JVM heap usage under observation, through the jconsole or similar tools; alternatively, the Server's own monitor log also provides some useful information.