-
1. Re: OutOfMemoryError
adrian.brock Jul 22, 2003 7:35 PM (in response to pants)Don't keep hold of class references in your code.
Typically, these are in supporting jars, usually
in static HashMaps.
I've heard struts 1.0 had this problem and I was
also speaking with somebody recently who had
a similar problem with hibernate.
Regards,
Adrian -
2. Re: OutOfMemoryError
pants Jul 25, 2003 5:26 AM (in response to pants)What exactly do you mean by "holding references". Do you mean just set the variable to null?
What do you do with static variables?
Do you use an explicit close or dispose method? -
3. Re: OutOfMemoryError
adrian.brock Jul 25, 2003 10:21 AM (in response to pants)No, the supporting jar is not in the deployment.
It has something like:
static HashMap map = new HashMap();
somewhere it will do
map.put(anObjectFromDeployment);
but never remove it.
Regards,
Adrian -
4. Re: OutOfMemoryError
pants Aug 8, 2003 9:03 AM (in response to pants)I've tried just using an empty mbean in the default jboss server. The mbean is two classes and simply has a start and a stop method. The two methods are empty.
Each time I redeploy this mbean the previous instances are not unloaded. If I profile the application in OptimizeIt it shows lots of versions of the mbean classes loaded in the VM with one instance of the latest version allocated.
JBoss is not unloading classes. Is there a way to fix this? -
5. Re: OutOfMemoryError
akirdat Aug 8, 2003 9:31 PM (in response to pants)have tried increasing the stack size?
you can do this by using "-mx512m" for 512M of RAM at the java command line -
6. Re: OutOfMemoryError
pants Aug 11, 2003 8:05 AM (in response to pants)Ummm, what happens when the memory used exceeds the 512M stack. Set the stack to 1024Mb? What if it goes beyond that? I'm not sure this is a solution.