Tutorial

Eclipse OutOfMemory Error Fix by increasing Heap Memory/Permgen Space

Published on August 3, 2022
author

Pankaj

Eclipse OutOfMemory Error Fix by increasing Heap Memory/Permgen Space

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.

-Xmx2048m

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.

-XX:MaxPermSize=512M

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors
Default avatar
Pankaj

author

While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
JournalDev
DigitalOcean Employee
DigitalOcean Employee badge
January 29, 2021

It worked, thank you very much.

- Ashish Sharma

    JournalDev
    DigitalOcean Employee
    DigitalOcean Employee badge
    June 22, 2020

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

    - Mohamed Raffi

      JournalDev
      DigitalOcean Employee
      DigitalOcean Employee badge
      May 11, 2020

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

      - Praveen

        JournalDev
        DigitalOcean Employee
        DigitalOcean Employee badge
        May 9, 2019

        It worked very well. Thank you.

        - Kandy

          JournalDev
          DigitalOcean Employee
          DigitalOcean Employee badge
          January 31, 2019

          Worked for me …Thank you.

          - jakeer

            JournalDev
            DigitalOcean Employee
            DigitalOcean Employee badge
            December 7, 2018

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

            - Buster McGibbons

              JournalDev
              DigitalOcean Employee
              DigitalOcean Employee badge
              October 11, 2018

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

              - Aradhana

                JournalDev
                DigitalOcean Employee
                DigitalOcean Employee badge
                August 3, 2018

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

                - Joe D.

                  JournalDev
                  DigitalOcean Employee
                  DigitalOcean Employee badge
                  October 23, 2017

                  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

                  - Rohit

                    JournalDev
                    DigitalOcean Employee
                    DigitalOcean Employee badge
                    October 8, 2017

                    An internal error occurred during: “Retrieving archetypes:”. GC overhead limit exceeded please help me to solve this

                    - HARSHA VARDHAN

                      Try DigitalOcean for free

                      Click below to sign up and get $200 of credit to try our products over 60 days!

                      Sign up

                      Join the Tech Talk
                      Success! Thank you! Please check your email for further details.

                      Please complete your information!

                      Featured on Community

                      Get our biweekly newsletter

                      Sign up for Infrastructure as a Newsletter.

                      Hollie's Hub for Good

                      Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

                      Become a contributor

                      Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

                      Welcome to the developer cloud

                      DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

                      Learn more