Discussion Locked This discussion was locked by a forum moderator.

Java Out of Memory Error

Please login with a confirmed email address before reporting spam

Running a parametric sweep of a 2d electrostatic model. Sweeping two parameters results in 80 configurations.
The computer this runs on has 12 Gb of ram.
The analysis never goes over 1 Gb for the Working Set or Virtual Memory
Comsol Version 4.0, Windows 7 64 bit.

Near the end of the run, sometimes, get an error message relating to memory. Here is the last bit from the log:

00611:005 ERROR Exception:
java.lang.OutOfMemoryError: GC overhead limit exceeded
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Error in sweep: GC overhead limit exceeded
[com.comsol.logger]
00611:005 ERROR Stack trace: [com.comsol.logger]
00633:891 ERROR Exception:
java.lang.ArrayIndexOutOfBoundsException
(rethrown as com.comsol.util.exceptions.FlException)
Messages:

[com.comsol.logger]
00633:906 ERROR Stack trace: [com.comsol.logger]


What is going on, and How do I fix this issue?

10 Replies Last Post 7 sept. 2017, 16:51 UTC−4
COMSOL Moderator

Hello Roy Martin

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 juil. 2010, 19:34 UTC−4
I am having GC overhead limit issues too.

My machine has huge amounts of RAM.

Is there a particular version of Java we should have installed on a Windows 7 machine?
I am having GC overhead limit issues too. My machine has huge amounts of RAM. Is there a particular version of Java we should have installed on a Windows 7 machine?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 juil. 2010, 06:07 UTC−4
Maybe the maximum java heap size is the problem. I remember 256MB is the default setting for this.

I would try to increase it by editing the MAXHEAP-value in the comsol.opts file, which is located in the comsol bin directory to 512MB or higher ...
Maybe the maximum java heap size is the problem. I remember 256MB is the default setting for this. I would try to increase it by editing the MAXHEAP-value in the comsol.opts file, which is located in the comsol bin directory to 512MB or higher ...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 juil. 2010, 05:04 UTC−4
Hi,

I have a similar problem, but there is no comsol.opt file in the bin directory neither in any comsol directories.

Can someone give me some advice?

Thanks,
Mate
Hi, I have a similar problem, but there is no comsol.opt file in the bin directory neither in any comsol directories. Can someone give me some advice? Thanks, Mate

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 juil. 2010, 07:08 UTC−4
"On UNIX, Linux, and the Macintosh, edit the 'comsol' shell script, located in the bin directory under your COMSOL directory."

just read the doc ;)
"On UNIX, Linux, and the Macintosh, edit the 'comsol' shell script, located in the bin directory under your COMSOL directory." just read the doc ;)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 juil. 2010, 09:44 UTC−4
This option seems to be available for COMSOL 3.5 but not for COMSOL 4.0

There is no comsol.opts file in the bin directory for COMSOL 4

What is the fix for 4.0?
This option seems to be available for COMSOL 3.5 but not for COMSOL 4.0 There is no comsol.opts file in the bin directory for COMSOL 4 What is the fix for 4.0?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 juil. 2010, 10:53 UTC−4
Jarlath is right, there is no comsol.opt file for 4.0 (although there is for 3.4).

I can't access the KB, because I only have students license, but I know there are topics on Java Runtime Errors.
A week ago 4.0 worked fine and since yesterday it keeps crashing right after I start it.

Do you know any solutions?
Jarlath is right, there is no comsol.opt file for 4.0 (although there is for 3.4). I can't access the KB, because I only have students license, but I know there are topics on Java Runtime Errors. A week ago 4.0 worked fine and since yesterday it keeps crashing right after I start it. Do you know any solutions?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 sept. 2010, 18:39 UTC−4
There is no comsol.opt file anymore for version 4.0. However, under \COMSOL40a\bin\win32 or \COMSOL40a\bin\win64 there are the files comsol.ini and comsolserver.ini. The maximum Java heap size is defined as the numeric value after -Xmx. The default is -Xmx1024m or 1024 megabytes.

There are other configuration options here which are specified in \COMSOL40a\java\win64\jre\bin\server\Xusage.txt or \COMSOL40a\java\win32\jre\bin\client\Xusage.txt.
There is no comsol.opt file anymore for version 4.0. However, under \COMSOL40a\bin\win32 or \COMSOL40a\bin\win64 there are the files comsol.ini and comsolserver.ini. The maximum Java heap size is defined as the numeric value after -Xmx. The default is -Xmx1024m or 1024 megabytes. There are other configuration options here which are specified in \COMSOL40a\java\win64\jre\bin\server\Xusage.txt or \COMSOL40a\java\win32\jre\bin\client\Xusage.txt.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26 mars 2014, 05:27 UTC−4
Hello everybody
Has anyone solved this problem with memory and JAVA?

I have the same problem and I'm using v4.4

Hello everybody Has anyone solved this problem with memory and JAVA? I have the same problem and I'm using v4.4

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 7 sept. 2017, 12:36 UTC−4
You may take a look at this post:

"Error: Java heap space. LiveLink for MATLAB." at

www.comsol.com/support/knowledgebase/1092/

Thank you.
You may take a look at this post: "Error: Java heap space. LiveLink for MATLAB." at https://www.comsol.com/support/knowledgebase/1092/ Thank you.

Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 7 sept. 2017, 16:51 UTC−4
Updated: 7 years ago 7 sept. 2017, 16:51 UTC−4
Hello All,

Samuel's response here is appropriate, and we would also suggest the following article:
www.comsol.com/support/knowledgebase/830/

The original error message reported in this thread (which was for version 4.0, and from over seven years ago) should now be resolved, so we will close this thread for further comments. Of course if anyone encounters similar issues, and if the above knowledgebase article does not resolve them, please do not hesitate to contact us.

Best Regards,
Hello All, Samuel's response here is appropriate, and we would also suggest the following article: https://www.comsol.com/support/knowledgebase/830/ The original error message reported in this thread (which was for version 4.0, and from over seven years ago) should now be resolved, so we will close this thread for further comments. Of course if anyone encounters similar issues, and if the above knowledgebase article does not resolve them, please do not hesitate to contact us. Best Regards,

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.