SGD 4.31 -- java.lang.OutOfMemoryError

I'm getting java.lang.OutOfMemoryError on a newly upgraded 4.31 installation of SGD.

My question is this: How do I increase the absolute maximum JVM size available to Secure Global Desktop? That's what the error message tells me to do, but I haven't been able to find out how to do it. I've searched the documentation and the knowledge base, but I haven't had any luck.

I'm thinking that it should be an easy fix, but I haven't found out how. Any ideas?

Here is the complete error message:

java.lang.OutOfMemoryError: Java heap space

at com.sco.cid.common.util.EasyCloneHashtable.cloneTable(EasyCloneHashtable.java:525)

at com.sco.cid.common.util.EasyCloneHashtable.put(EasyCloneHashtable.java:396)

at com.sco.jndi.toolkit.provider.BaseContext.addToEnvironment(BaseContext.java:1241)

at com.sco.tta.server.server.asad.AsadCalcTask.getContext(AsadCalcTask.java:1466)

Out of memory error occurredwhile handling out of memory.

Out of memory error occurredwhile handling out of memory.

2007/06/18 09:01:14.291 (pid 26093)proxy/server#6

Sun Secure Global Desktop Software(4.31) ERROR:

JServer shut down after 363 seconds on exit code 1 and signal number 0.

Proxy will attempt to restart.

Secure Global Desktop services are temporarily unavailable.

Services will be restored when the JServer restarts.

2007/06/18 09:01:14.292 (pid 26093)proxy/server#8

Sun Secure Global Desktop Software(4.31) ERROR:

JServer ran out of memory and has hit the upper limit of the amount of memory

it is allowed.

Memory limit is 512 Mb.

Secure Global Desktop services will continue, but will not be allowed to use

any more memory.

You may wish to increase the absolute maximum JVM size available to Secure

Global Desktop.

[1927 byte] By [dbartholomewa] at [2007-11-27 8:00:39]
# 1

how many users do you have connected to your server?

how much physical memory (RAM) do you have installed on your server? This will help determine what is your ABSMAX for JVM heap. The rule of thumb is to not exceed 20% of physical for heap max.

So if you have 4gb of ram, then you should not set your JVM to higher than 768mb (20% of ram). If you have less than 4gb of ram and the default is already set to 512mb, then you need to increase physical ram before you increase JVM heap.

http://docs.sun.com/source/819-6255/am_tuning.html

see

--tuning-jvm-initial MB

--tuning-jvm-max MB

NOTE: do not change the

--tuning-jvm-scale percent

sometimes it is a good idea to set the initial and the max to be the same value, that way the heap is allocated to it's max size during Jserver start (tarantella start or reboot via rc script).

hope this helps

carmelomttaa at 2007-7-12 19:42:40 > top of Java-index,Desktop,Sun Secure Global Desktop Software...
# 2

Thanks for the reply!

I missed the page of the manual you pointed me to.

My server has 4GB of RAM, so I bumped the initial and max memory up to 768. Hopefully that will take care of the issue.

No has been connected to the server, except myself, for the past several days. I thought it was weird for the server to run out of memory when it wasn't doing anything, but that's what has been happening.

When I put the server into production it will have between 10 to 30 users using it at any given point.

I'll post again if the problem persists.

Thanks again!

dbartholomewa at 2007-7-12 19:42:40 > top of Java-index,Desktop,Sun Secure Global Desktop Software...
# 3
you could also run into OoM error if you have too many objects in your webtop. How many objects do you have on your webtop? 100+
carmelomttaa at 2007-7-12 19:42:40 > top of Java-index,Desktop,Sun Secure Global Desktop Software...
# 4
Is there a limit in the amount of applications assigned to a user?At one customer we are planning to give everyone all 700 available applications.Thanks,Remold | Everett
remolda at 2007-7-12 19:42:40 > top of Java-index,Desktop,Sun Secure Global Desktop Software...
# 5

there is no limit on how many apps you can give a user, but do note that for a given user each object consumes about 11k of heap, plus there is an overhead.

so it looks something like

W (objects) x 11k (object cost) + 300k (connection cost) + (X (apps per user) x 15k (app cost)) = Z

or in your example

(700 x 11k) + 300k + (1 x 15) ~= 8.2mb of Heap / +- 10% error = about 9mb. So each user with 700 objects in webtop will consume about 9mb of heap. Your default max size = 512mb

$ tarantella config list | grep jvm

a 32bit (which is what SGD uses) can only use 4gb (2^32) of heap, but you should not exceed 3gb per most Java experts. Once last rule is that you should not exceed 25% of RAM when configuring heap. So if you have 4gb of RAM, then your max JVM should be 768mb and then you divide 768 / 9mb and get about 80 users that this system can support with the size of the webtop you plan.

hope this makes sense, if it does not, contact a Sun Sales/SE to get some assistance.

carmelomttaa at 2007-7-12 19:42:40 > top of Java-index,Desktop,Sun Secure Global Desktop Software...