Eclipse OutOfMemory Error Fix by increasing Heap Memory/Permgen Space

Filed Under: Java

Eclipse Out of Memory Error happens when you are working on large projects. Sometimes it’s because of Permgen space (below Java 8) and sometimes your eclipse memory runs out of heap memory.

Eclipse OutOfMemoryError Fix

We can increase eclipse memory by providing more Permgen space and heap memory for Eclipse to use. These settings are usually configured in the eclipse.ini file. You can check the location of the eclipse.ini file from below images for Mac OS X.

eclipse out of memory, eclipse memory

eclipse.ini file, eclipse.ini file location mac

In windows, you will find the eclipse.ini file in the same directory as the eclipse.exe file.

eclipse.ini file location windows 10

Once you have located the eclipse.ini file, just open it in your favorite text editor.

Increase Eclipse Heap Space

You can increase the maximum heap size by editing -Xmx value. For example, below snippet will increase the eclipse heap size to 2 GB.


increase eclipse memory size windows

Increase Permgen Space in Eclipse

If you are using below Java 8, then you might get OutOfMemoryError: Permgen space, just increase the permanent generation space available to Eclipse. Below is the configuration to increase permgen space to 512 MB in eclipse.ini file.



  1. Ashish Sharma says:

    It worked, thank you very much.

  2. Mohamed Raffi says:

    Thanks a lot…. after increasing the memory…its working fine

  3. Praveen says:

    I already have configured to 2056. What should I do? I still get error frequently.

  4. Kandy says:

    It worked very well. Thank you.

  5. jakeer says:

    Worked for me …Thank you.

  6. Buster McGibbons says:

    Not helpful at all. Most people use Windows these days.

    1. Pankaj says:

      I have already mentioned that in Windows eclipse.ini file is at the same location as the eclipse.exe file. I have also added an image now for more clarity.

  7. Aradhana says:


    I am getting an internal error while launching the eclipse saying “java heap space ” during setup check.
    Please help me!

  8. Joe D. says:

    Worked for me on OSX High Sierra using Eclipse Oxygen. Thanks

  9. Rohit says:

    Hello …

    I have an issue, My spring tool suite hangs (not responding) after using it for 5 mins and this happens when I start my server on which our application is hosted . Please help me out

    1. Pankaj says:

      Increase eclipse memory by editing eclipse.ini file, or use a separate server that is not embedded in eclipse.

  10. HARSHA VARDHAN says:

    An internal error occurred during: “Retrieving archetypes:”.
    GC overhead limit exceeded

    please help me to solve this

  11. Sana Shaikh says:

    thnks alot sir….really helpful

  12. sathya says:

    I am a regular reader of your blog. the blog is very interesting and will be much useful for us.

Comments are closed.

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors