I am using jive messenger . I have more than 100 clients installed on it. But some times I receive error . After restarting the server everything start working fine. I have java memory of 63.31MB. When i receive this error i see java memory over filled in admin console of jive messenger.
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “pool-2-thread-3” java.lang.OutOfMemoryError: Java heap space
Exception in thread “pool-2-thread-2” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “pool-2-thread-5” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “SocketListener0-1” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Exception in thread “Client SR” java.lang.OutOfMemoryError: Java heap space
Increase the heap size about ~64 MB. That will give you more breathing room.
If you can’'t increase the memory, decrease the stack size. You can do that by editing the vmoptions file to pass in -Xss16k (see the install doc for vmoptions file info).
That is quite possible to get this Exception when you use Jive Messenger not only in Version 2.3, but all the versions. Jive Messenger assign one exclusive connection and thread to each client which is connecting to this server, so it is really resource-consuming. I suggest some points for you to avoid this:
add argument to increase java VM maximum heap size, for example: add ‘’-Xmx1024m’’ behind ‘‘java’’ command
add argument to minish java thread stack size, for example: add ‘’-Xss96k’’ behind ‘‘java’’ command
the more complicated method, modify the code. You can let the server not assign one exclusive connection and thread to each client.
Add ‘’-verbose:gc -XX:*PrintGCDetails -XX:*PrintGCTimeStamps -Xloggc:logs/gc.log’’ behind ‘‘nohup “$app_java_home/bin/java”’’ or set it in the wildfire.vmoptions file to get more memory informations. This will lead to some overhead, so maybe you will use it only for some tests.
I assume that -Xmx96m should be fine if the server crashes only some times with currently -Xmx64m. Do not try -Xmx1024m unless you know that you have 1 GB and also need 1 GB for jive messenger - it may slow down the JVM.
Maybe you will also modify the -Xms and -XX:NewSize= values for less garbage collections and a better performance.
I tried to change the heap size by using java -Xms64m -Xmx512m but nothing happened . Still I can see the size is same. Plz guide me in steps how to change the heap size. Do I have to uninstall the jive messenger and install it again.
If you’'re using a script to start Wildfire, you can make simillar changes in that script.
Also note that you probably want to have a much smaller value for Xss than you specified. You’'re reserving that amount of memory (you specified Megabytes, not kilobytes) for each thread!