Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Running out of heap space when loading workspaces

After a reinstall of the 5.02 eclipse client I am now unable to load workspaces of any size beyond a few dozen files in the eclipse client, getting out of memory errors reported as shown below.

An internal error occurred during: "Loading repository items".
java.lang.OutOfMemoryError: Java heap space

I have already tried setting the max heap in eclipse.ini, scm.ini and scm.sh but this has not helped (-Xmx4096m). Strangely dumps produced on failure are only 1.1Gb whihc would seem to indicate that the settings are not taking effect.

Running on linux if it makes any difference. HAve also tried updating to interim fix 11, still no joy.


0 votes



2 answers

Permanent link
Ive figured this out, the problem is that I was using "lock to launcher" in unity so I could easily launch eclipse, when you do this ubuntu creates a .desktop file in  ~/.local/share/applications/rational_team_concert.desktop which include -Xmx512m overriding the eclipse.ini.

The clue was that the javacores listed Xmx as being set to 512mb and this got me looking at starting the program in diffeent ways using the heap indicator built into eclipse to check the results.

1 vote


Permanent link

The OutOfMemoryError: Java heap space you are encountering while loading workspaces typically occurs when Eclipse is not actually using the heap size you have configured. Even though you have specified -Xmx4096m, the Eclipse seems to be running on a 32-bit JVM or the JVM arguments are not being picked up at startup. 

On Linux, this often occurs if Eclipse is using a different Java installation than expected. Eclipse only reads JVM options from the eclipse.ini file located next to the Eclipse executable, and the placement of the options matters. The -vm option must point explicitly to a 64-bit Java binary and must appear before -vmargs, while all memory-related options such as -Xmx must appear after -vmargs. If Eclipse is launched via a wrapper script or shortcut that references another installation, changes to the wrong eclipse.ini file will have no effect.

So in order to resolve the issue, please check if you have a 64-bit JDK or JRE installed. Once Eclipse is confirmed to be running on a 64-bit JVM and the correct eclipse.ini is being applied, the heap settings you have set will take effect, and the heap dump size should increase accordingly.

To learn more interesting details about the OutOfMemoryError: Java heap space error, You can check out this blog How to Solve OutOfMemoryError: Java heap space. This will give you more insights about this Java Heap Space error.


0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 04 '16, 9:51 a.m.

Question was seen: 7,980 times

Last updated: Jan 05, 3:04 a.m.

Confirmation Cancel Confirm