2

I am working with a Java program (reading large files) on Eclipse - Windows. After running my program I get the error:

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

I see on http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom that I should add the option -XX:-UseGCOverheadLimit to the command line.

Where should I add this option? How can I solve this?

user3450666
  • 45
  • 1
  • 1
  • 5
  • 2
    http://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded?rq=1 – RaceBase Apr 03 '14 at 10:00
  • This could help you: http://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded – 3751_Creator Apr 03 '14 at 10:01
  • you can add new arguments in eclipse: Run > Run Configuration.. > Arguments(x). Anyway I can't tell if it's the case. – Pievis Apr 03 '14 at 10:28

1 Answers1

0

In your Tomcat bin folder you will find a file Catalina.sh which has a variable called CATALINA_OPTS. You need set it with -XX:-UseGCOverheadLimit.

Though I am not very learned in this subject, AFAIK this is a temporary solution. You make check this answer. It might help.

Community
  • 1
  • 1
shazinltc
  • 3,616
  • 7
  • 34
  • 49