Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space [message #324577] Mon, 28 January 2008 00:00 Go to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hello,

I'm receiving frequently java.lang.OutOfMemoryError: Java heap space errors.

I did increase the settings in Eclipse.ini to the following values:

-Xms356m
-Xmx640m
-Xmn128m
-XX:+UseParallelGC
-XX:MaxPermSize=256

If I monitor Eclipse in the Windows task manager I see that Eclipse is
around 230 MB before crashing; to my knowledge my settings should be
sufficient.

The system asked me to check .log for additional information but I cannot
find any .log files other then the install.log and error_recovery.log, both
do not contain additional information.

Any advice?

Best regards, Lars
Re: java.lang.OutOfMemoryError: Java heap space [message #324578 is a reply to message #324577] Mon, 28 January 2008 00:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------090507010404050001080103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Lars,

If your settings were taking effect, you'd get up to 640. Look in the
<workspace>/.metadata/.log for track traces. Is it regular memory or
permgen that's running out? My eclipse.ini looks like this so I'm not
sure your max perm size is quite right.

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m

You might have to run with -clean for eclipse.ini changes to take
effect. And note that in 3.3.1 the launcher argument was being ignored
and that was fixed in 3.3.1.1.


Lars Vogel wrote:
> Hello,
>
> I'm receiving frequently java.lang.OutOfMemoryError: Java heap space errors.
>
> I did increase the settings in Eclipse.ini to the following values:
>
> -Xms356m
> -Xmx640m
> -Xmn128m
> -XX:+UseParallelGC
> -XX:MaxPermSize=256
>
> If I monitor Eclipse in the Windows task manager I see that Eclipse is
> around 230 MB before crashing; to my knowledge my settings should be
> sufficient.
>
> The system asked me to check .log for additional information but I cannot
> find any .log files other then the install.log and error_recovery.log, both
> do not contain additional information.
>
> Any advice?
>
> Best regards, Lars
>
>
>


--------------090507010404050001080103
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Lars,<br>
<br>
If your settings were taking effect, you'd get up to 640.&nbsp; Look in the
&lt;workspace&gt;/.metadata/.log for track traces.&nbsp; Is it regular
memory or permgen that's running out? My eclipse.ini looks like this so
I'm not sure your max perm size is quite right.&nbsp;
<blockquote>-showsplash<br>
org.eclipse.platform<br>
--launcher.XXMaxPermSize<br>
256m<br>
-vmargs<br>
-Xms40m<br>
-Xmx256m<br>
</blockquote>
You might have to run with -clean for eclipse.ini changes to take
effect.&nbsp; And note that in 3.3.1 the launcher argument was being ignored
and that was fixed in 3.3.1.1.<br>
<br>
<br>
Lars Vogel wrote:
<blockquote cite="mid:fnj5uk$gap$1@build.eclipse.org" type="cite">
<pre wrap="">Hello,

I'm receiving frequently java.lang.OutOfMemoryError: Java heap space errors.

I did increase the settings in Eclipse.ini to the following values:

-Xms356m
-Xmx640m
-Xmn128m
-XX:+UseParallelGC
-XX:MaxPermSize=256

If I monitor Eclipse in the Windows task manager I see that Eclipse is
around 230 MB before crashing; to my knowledge my settings should be
sufficient.

The system asked me to check .log for additional information but I cannot
find any .log files other then the install.log and error_recovery.log, both
do not contain additional information.

Any advice?

Best regards, Lars


</pre>
</blockquote>
<br>
</body>
</html>

--------------090507010404050001080103--
Re: java.lang.OutOfMemoryError: Java heap space [message #324579 is a reply to message #324578] Mon, 28 January 2008 00:55 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

This is a multi-part message in MIME format.

------=_NextPart_000_005E_01C86150.ED53CFF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Ed,

thank you for your response. The error which currently occurs is =
java.lang.OutOfMemoryError; I haven't seen a permgen error in days. ;-)=20

I'll try your settings (with increased values) and see if the problem =
persists. I'm running also 3.3.1.1

Thanks again, Lars

"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:fnj6r7$lqv$1@build.eclipse.org...
Lars,

If your settings were taking effect, you'd get up to 640. Look in the =
<workspace>/.metadata/.log for track traces. Is it regular memory or =
permgen that's running out? My eclipse.ini looks like this so I'm not =
sure your max perm size is quite right. =20
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m

You might have to run with -clean for eclipse.ini changes to take =
effect. And note that in 3.3.1 the launcher argument was being ignored =
and that was fixed in 3.3.1.1.


Lars Vogel wrote:=20
Hello,

I'm receiving frequently java.lang.OutOfMemoryError: Java heap space =
errors.

I did increase the settings in Eclipse.ini to the following values:

-Xms356m
-Xmx640m
-Xmn128m
-XX:+UseParallelGC
-XX:MaxPermSize=3D256

If I monitor Eclipse in the Windows task manager I see that Eclipse is=20
around 230 MB before crashing; to my knowledge my settings should be=20
sufficient.

The system asked me to check .log for additional information but I =
cannot=20
find any .log files other then the install.log and error_recovery.log, =
both=20
do not contain additional information.

Any advice?

Best regards, Lars=20


=20

------=_NextPart_000_005E_01C86150.ED53CFF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.3199" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Ed,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thank you for your response. The error =
which=20
currently occurs is java.lang.OutOfMemoryError;&nbsp;I haven't seen a =
permgen=20
error in days. ;-)&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'll try your settings (with increased =
values) and=20
see if the problem persists. I'm running also 3.3.1.1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks again, Lars</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:fnj6r7$lqv$1@build.eclipse.org">news:fnj6r7$lqv$1@build.ecli=
pse.org</A>...</DIV>Lars,<BR><BR>If=20
your settings were taking effect, you'd get up to 640.&nbsp; Look in =
the=20
&lt;workspace&gt;/.metadata/.log for track traces.&nbsp; Is it regular =
memory=20
or permgen that's running out? My eclipse.ini looks like this so I'm =
not sure=20
your max perm size is quite right.&nbsp;=20
=
<BLOCKQUOTE>-showsplash<BR>org.eclipse.platform<BR>--launcher.XXMaxPermSi=
ze<BR>256m<BR>-vmargs<BR>-Xms40m<BR>-Xmx256m<BR></BLOCKQUOTE >You=20
might have to run with -clean for eclipse.ini changes to take =
effect.&nbsp;=20
And note that in 3.3.1 the launcher argument was being ignored and =
that was=20
fixed in 3.3.1.1.<BR><BR><BR>Lars Vogel wrote:=20
<BLOCKQUOTE cite=3Dmid:fnj5uk$gap$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Hello,

I'm receiving frequently java.lang.OutOfMemoryError: Java heap space =
errors.

I did increase the settings in Eclipse.ini to the following values:

-Xms356m
-Xmx640m
-Xmn128m
-XX:+UseParallelGC
-XX:MaxPermSize=3D256

If I monitor Eclipse in the Windows task manager I see that Eclipse is=20
around 230 MB before crashing; to my knowledge my settings should be=20
sufficient.

The system asked me to check .log for additional information but I =
cannot=20
find any .log files other then the install.log and error_recovery.log, =
both=20
do not contain additional information.

Any advice?

Best regards, Lars=20


</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_005E_01C86150.ED53CFF0--
Re: java.lang.OutOfMemoryError: Java heap space [message #324580 is a reply to message #324577] Mon, 28 January 2008 04:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
news:fnj5uk$gap$1@build.eclipse.org...
> Hello,
>
> I'm receiving frequently java.lang.OutOfMemoryError: Java heap space
> errors.
>
> I did increase the settings in Eclipse.ini to the following values:
>
> -Xms356m
> -Xmx640m
> -Xmn128m
> -XX:+UseParallelGC
> -XX:MaxPermSize=256


I take it from those options that you're running on some sort of Unix. Can
you be more specific about your JRE and platform?

Might help to post your config details, and perhaps any interesting snippets
from your .log file.

How big are your workspaces and what kind of projects are you working on?
Is it, in fact, possible that you just need even more memory? (E.g., do you
still run out if you set -Xmx1024m?) I agree that's not consistent with the
heap indicator showing only 230MB but maybe there's something funny going
on.
Re: java.lang.OutOfMemoryError: Java heap space [message #324648 is a reply to message #324580] Tue, 29 January 2008 23:56 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Walter,
thank you for your reply.

I actually do use Windows XP with JRE 1.6.

I did increase my memory as suggest by you and will report if I get another
crash. The workspace I'm working in is about 80 MB, it mainly consists of
XML files and several plug-in projects.

Snippet of the log file attached (see below).

Best regards, Lars
----------
!STACK 0
java.lang.ClassCastException: java.lang.OutOfMemoryError cannot be cast to
org.eclipse.core.runtime.CoreException
at
org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLa unchShortcut.findTypes(JavaApplicationLaunchShortcut.java:11 2)
at
org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcu t.searchAndLaunch(JavaLaunchShortcut.java:56)
at
org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcu t.launch(JavaLaunchShortcut.java:227)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchSho rtcutExtension.launch(LaunchShortcutExtension.java:429)
at
org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.r un(LaunchShortcutAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)



"Walter Harley" <wharley@bea.com> wrote in message
news:fnjn00$ou1$1@build.eclipse.org...
> "Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
> news:fnj5uk$gap$1@build.eclipse.org...
>> Hello,
>>
>> I'm receiving frequently java.lang.OutOfMemoryError: Java heap space
>> errors.
>>
>> I did increase the settings in Eclipse.ini to the following values:
>>
>> -Xms356m
>> -Xmx640m
>> -Xmn128m
>> -XX:+UseParallelGC
>> -XX:MaxPermSize=256
>
>
> I take it from those options that you're running on some sort of Unix.
> Can you be more specific about your JRE and platform?
>
> Might help to post your config details, and perhaps any interesting
> snippets from your .log file.
>
> How big are your workspaces and what kind of projects are you working on?
> Is it, in fact, possible that you just need even more memory? (E.g., do
> you still run out if you set -Xmx1024m?) I agree that's not consistent
> with the heap indicator showing only 230MB but maybe there's something
> funny going on.
>
Re: java.lang.OutOfMemoryError: Java heap space [message #324650 is a reply to message #324648] Wed, 30 January 2008 00:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
news:fnoeev$fkg$1@build.eclipse.org...
> Hi Walter,
> thank you for your reply.
>
> I actually do use Windows XP with JRE 1.6.

You said your parameters were:
> -Xms356m
> -Xmx640m
> -Xmn128m
> -XX:+UseParallelGC
> -XX:MaxPermSize=256

I'm concerned about that "256", which seems like it should have an 'm' after
it. I know you're not getting permgen failures, I'm just digging for
anything unusual about your configuration.

Do you still get the failures if you simplify these options, e.g., get rid
of the ParallelGC and the -Xmn? I'm not sure those are doing you any good
in a client app. In particular, the -Xmn is going to be reducing the
effective size of your heap.

Also, do you get anything useful if you add
"-XX:+HeapDumpOnOutOfMemoryError"? (Not that digging through 1G of dumped
heap is a pleasure.)
Re: java.lang.OutOfMemoryError: Java heap space [message #324683 is a reply to message #324648] Wed, 30 January 2008 17:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Lars Vogel wrote:
> Hi Walter,
> thank you for your reply.
>
> I actually do use Windows XP with JRE 1.6.
>
> I did increase my memory as suggest by you and will report if I get another
> crash. The workspace I'm working in is about 80 MB, it mainly consists of
> XML files and several plug-in projects.
>
> Snippet of the log file attached (see below).
>
> Best regards, Lars
> ----------
> !STACK 0
> java.lang.ClassCastException: java.lang.OutOfMemoryError cannot be cast to
> org.eclipse.core.runtime.CoreException
> at
> org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLa unchShortcut.findTypes(JavaApplicationLaunchShortcut.java:11 2)

Hmm, that is a strange error. It is not directly reporting an
OutOfMemoryError, but rather that something in the JDT launching code is
trying to cast an OOM to a CoreException. That suggests to me two
possible things:
1) that Eclipse itself may not be actually running out of memory, but
the app you're trying to run does
2) that there is a bug in the JDT launching code where it is trying to
do the cast that is invalid.

Lars, can you repeat the description of the behavior you see when this
happens? Does Eclipse continue to function or become
unusable/nonres-ponsive? Or does it hard-crash altogether? Etc...

Eric
Re: java.lang.OutOfMemoryError: Java heap space [message #324689 is a reply to message #324650] Wed, 30 January 2008 18:16 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Walter,

with the increased parameters from Ed I did not yet receive a dump.

So currently me eclipse.ini looks like the following:

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
-vmargs
-Xms40m
-Xmx512m
-XX:+HeapDumpOnOutOfMemoryError

If I receive this error again I will make the HeapDump available if that is
useful.

Best regards, Lars


"Walter Harley" <wharley@bea.com> wrote in message
news:fnoi6b$gpn$1@build.eclipse.org...
> "Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
> news:fnoeev$fkg$1@build.eclipse.org...
>> Hi Walter,
>> thank you for your reply.
>>
>> I actually do use Windows XP with JRE 1.6.
>
> You said your parameters were:
>> -Xms356m
>> -Xmx640m
>> -Xmn128m
>> -XX:+UseParallelGC
>> -XX:MaxPermSize=256
>
> I'm concerned about that "256", which seems like it should have an 'm'
> after it. I know you're not getting permgen failures, I'm just digging
> for anything unusual about your configuration.
>
> Do you still get the failures if you simplify these options, e.g., get rid
> of the ParallelGC and the -Xmn? I'm not sure those are doing you any good
> in a client app. In particular, the -Xmn is going to be reducing the
> effective size of your heap.
>
> Also, do you get anything useful if you add
> "-XX:+HeapDumpOnOutOfMemoryError"? (Not that digging through 1G of dumped
> heap is a pleasure.)
>
Re: java.lang.OutOfMemoryError: Java heap space [message #324690 is a reply to message #324683] Wed, 30 January 2008 18:18 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Eric,

usally Eclipse becomes unusable after this error. In some cases I can close
it in some I have to kill it via the task list.

If it happens again (I changed the settings) I try to report more.

Best regards, Lars

"Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
news:fnqb25$q8a$1@build.eclipse.org...
> Lars Vogel wrote:
>> Hi Walter,
>> thank you for your reply.
>>
>> I actually do use Windows XP with JRE 1.6.
>>
>> I did increase my memory as suggest by you and will report if I get
>> another crash. The workspace I'm working in is about 80 MB, it mainly
>> consists of XML files and several plug-in projects.
>>
>> Snippet of the log file attached (see below).
>>
>> Best regards, Lars
>> ----------
>> !STACK 0
>> java.lang.ClassCastException: java.lang.OutOfMemoryError cannot be cast
>> to org.eclipse.core.runtime.CoreException
>> at
>> org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLa unchShortcut.findTypes(JavaApplicationLaunchShortcut.java:11 2)
>
> Hmm, that is a strange error. It is not directly reporting an
> OutOfMemoryError, but rather that something in the JDT launching code is
> trying to cast an OOM to a CoreException. That suggests to me two possible
> things:
> 1) that Eclipse itself may not be actually running out of memory, but the
> app you're trying to run does
> 2) that there is a bug in the JDT launching code where it is trying to do
> the cast that is invalid.
>
> Lars, can you repeat the description of the behavior you see when this
> happens? Does Eclipse continue to function or become
> unusable/nonres-ponsive? Or does it hard-crash altogether? Etc...
>
> Eric
Previous Topic:Creating PropertySource from Map (value pair) objects.
Next Topic:Enhancing the JDT Java Editor
Goto Forum:
  


Current Time: Fri Apr 19 20:12:46 GMT 2024

Powered by FUDForum. Page generated in 0.05086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top