Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Out of memory when building PHP project
Out of memory when building PHP project [message #58970] Thu, 18 October 2007 09:44 Go to next message
Bogdan Ribic is currently offline Bogdan RibicFriend
Messages: 13
Registered: July 2009
Junior Member
Hi All,

Every time I open a PHP project (around 50 PHP files total) I get out
of memory error and occasionaly eclipse freezes for a time while
'building' the PHP project.

Anyway, I tried increasing all VM parameters as much as jvm would
allow me (on a 2GB machine), eclipse.ini looks like this:

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-XX:MaxPermSize=256m
-Xms512m
-Xmx512m

But I still keep getting this:

!ENTRY org.eclipse.core.jobs 4 2 2007-10-18 11:42:06.984
!MESSAGE An internal error occurred during: "Building PHP projects ...".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionsParameterArray(Unknown
Source)
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionData(Unknown
Source)
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionDataArray(Unknown
Source)
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassData(Unknown
Source)
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassDataArray(Unknown
Source)
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileData(Unknown
Source)
at
org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileDataArray(Unknown
Source)
at
org.eclipse.php.internal.core.util.DefaultCacheManager.inner LoadModel(Unknown
Source)
at org.eclipse.php.internal.core.util.DefaultCacheManager.load( Unknown
Source)
at
org.eclipse.php.internal.core.phpModel.parser.PHPUserModelMa nager. <init>(Unknown
Source)
at
org.eclipse.php.internal.core.phpModel.parser.PHPUserModel.i nitialize(Unknown
Source)
at
org.eclipse.php.internal.core.phpModel.parser.PHPProjectMode l.initialize(Unknown
Source)
at
org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.putModel(Unknown
Source)
at
org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.getModelForProject(Unknown
Source)
at
org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.handle(Unknown
Source)
at
org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.visit(Unknown
Source)
at org.eclipse.core.internal.resources.Resource$2.visit(Resourc e.java:105)
at
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
at
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:103)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:87)
at
org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager$3.runInWorkspace(Unknown
Source)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Out of memory when building PHP project [message #58998 is a reply to message #58970] Thu, 18 October 2007 09:50 Go to previous messageGo to next message
Bogdan Ribic is currently offline Bogdan RibicFriend
Messages: 13
Registered: July 2009
Junior Member
Oh... and code completion doesn't work after the error.
Re: Out of memory when building PHP project [message #59073 is a reply to message #58970] Thu, 18 October 2007 23:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipsenews.20.epm.spamgourmet.com

Hi Bogdan,

This is a frequent and serious problem for me also. I've raised a bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206109

I am surprised you get it on a project with so few files, but I think it
is just a memory leak somewhere, maybe something in one of your files is
triggering it. I did notice a php file in the YUI library with a 1.5mb
string which can single handedly kill PDT for me.

You can sort of work around it by turning off 'Build Automatically' from
the Project menu... but as you mentioned, if a project fails to build
then code completion, find declaration, outlines, and most of the other
stuff that make an IDE useful stop working.

Go add your vote!

Cheers
Tom

Bogdan Ribic wrote:
> Hi All,
>
> Every time I open a PHP project (around 50 PHP files total) I get out
> of memory error and occasionaly eclipse freezes for a time while
> 'building' the PHP project.
>
> Anyway, I tried increasing all VM parameters as much as jvm would
> allow me (on a 2GB machine), eclipse.ini looks like this:
>
> -showsplash
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 256m
> -vmargs
> -XX:MaxPermSize=256m
> -Xms512m
> -Xmx512m
>
> But I still keep getting this:
>
> !ENTRY org.eclipse.core.jobs 4 2 2007-10-18 11:42:06.984
> !MESSAGE An internal error occurred during: "Building PHP projects ...".
> !STACK 0
> java.lang.OutOfMemoryError: Java heap space
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionsParameterArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionData(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionDataArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassData(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassDataArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileData(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileDataArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.DefaultCacheManager.inner LoadModel(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.DefaultCacheManager.load( Unknown Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPUserModelMa nager. <init>(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPUserModel.i nitialize(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPProjectMode l.initialize(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.putModel(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.getModelForProject(Unknown
> Source)
> at
> org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.handle(Unknown
> Source)
> at
> org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.visit(Unknown
> Source)
> at
> org.eclipse.core.internal.resources.Resource$2.visit(Resourc e.java:105)
> at
> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>
> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>
> at
> org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>
> at
> org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
> at
> org.eclipse.core.internal.resources.Resource.accept(Resource .java:103)
> at
> org.eclipse.core.internal.resources.Resource.accept(Resource .java:87)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager$3.runInWorkspace(Unknown
> Source)
> at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Out of memory when building PHP project [message #59098 is a reply to message #58970] Thu, 18 October 2007 23:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipsenews.20.epm.spamgourmet.com

Also, your stack trace looks a little different to mine, you should post
that to the ticket also.

I think the build process is particularly flaky and can break in several
ways.

Bogdan Ribic wrote:
> Hi All,
>
> Every time I open a PHP project (around 50 PHP files total) I get out
> of memory error and occasionaly eclipse freezes for a time while
> 'building' the PHP project.
>
> Anyway, I tried increasing all VM parameters as much as jvm would
> allow me (on a 2GB machine), eclipse.ini looks like this:
>
> -showsplash
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 256m
> -vmargs
> -XX:MaxPermSize=256m
> -Xms512m
> -Xmx512m
>
> But I still keep getting this:
>
> !ENTRY org.eclipse.core.jobs 4 2 2007-10-18 11:42:06.984
> !MESSAGE An internal error occurred during: "Building PHP projects ...".
> !STACK 0
> java.lang.OutOfMemoryError: Java heap space
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionsParameterArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionData(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionDataArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassData(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassDataArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileData(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileDataArray(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.DefaultCacheManager.inner LoadModel(Unknown
> Source)
> at
> org.eclipse.php.internal.core.util.DefaultCacheManager.load( Unknown Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPUserModelMa nager. <init>(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPUserModel.i nitialize(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPProjectMode l.initialize(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.putModel(Unknown
> Source)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.getModelForProject(Unknown
> Source)
> at
> org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.handle(Unknown
> Source)
> at
> org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.visit(Unknown
> Source)
> at
> org.eclipse.core.internal.resources.Resource$2.visit(Resourc e.java:105)
> at
> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>
> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>
> at
> org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>
> at
> org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
> at
> org.eclipse.core.internal.resources.Resource.accept(Resource .java:103)
> at
> org.eclipse.core.internal.resources.Resource.accept(Resource .java:87)
> at
> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager$3.runInWorkspace(Unknown
> Source)
> at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Out of memory when building PHP project [message #59123 is a reply to message #59098] Fri, 19 October 2007 08:28 Go to previous messageGo to next message
Marijn is currently offline MarijnFriend
Messages: 19
Registered: July 2009
Junior Member
This bug sounds familier. It might be the same as
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203984 which was fixed in
the last integration build. You should try the I20071001 build and see
if the problem still occurs.

Regards,

Marijn.

Tom Walter wrote:
> Also, your stack trace looks a little different to mine, you should post
> that to the ticket also.
>
> I think the build process is particularly flaky and can break in several
> ways.
>
> Bogdan Ribic wrote:
>> Hi All,
>>
>> Every time I open a PHP project (around 50 PHP files total) I get
>> out of memory error and occasionaly eclipse freezes for a time while
>> 'building' the PHP project.
>>
>> Anyway, I tried increasing all VM parameters as much as jvm would
>> allow me (on a 2GB machine), eclipse.ini looks like this:
>>
>> -showsplash
>> org.eclipse.platform
>> --launcher.XXMaxPermSize
>> 256m
>> -vmargs
>> -XX:MaxPermSize=256m
>> -Xms512m
>> -Xmx512m
>>
>> But I still keep getting this:
>>
>> !ENTRY org.eclipse.core.jobs 4 2 2007-10-18 11:42:06.984
>> !MESSAGE An internal error occurred during: "Building PHP projects ...".
>> !STACK 0
>> java.lang.OutOfMemoryError: Java heap space
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionsParameterArray(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionData(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeFunctionDataArray(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassData(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizeClassDataArray(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileData(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.SerializationUtil.deseria lizePHPFileDataArray(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.DefaultCacheManager.inner LoadModel(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.util.DefaultCacheManager.load( Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.phpModel.parser.PHPUserModelMa nager. <init>(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.phpModel.parser.PHPUserModel.i nitialize(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.phpModel.parser.PHPProjectMode l.initialize(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.putModel(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager.getModelForProject(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.handle(Unknown
>> Source)
>> at
>> org.eclipse.php.internal.core.project.build.FullPhpProjectBu ildVisitor.visit(Unknown
>> Source)
>> at
>> org.eclipse.core.internal.resources.Resource$2.visit(Resourc e.java:105)
>> at
>> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>>
>> at
>> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>>
>> at
>> org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>>
>> at
>> org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
>> at
>> org.eclipse.core.internal.resources.Resource.accept(Resource .java:103)
>> at
>> org.eclipse.core.internal.resources.Resource.accept(Resource .java:87)
>> at
>> org.eclipse.php.internal.core.phpModel.parser.PHPWorkspaceMo delManager$3.runInWorkspace(Unknown
>> Source)
>> at
>> org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Out of memory when building PHP project [message #59145 is a reply to message #58970] Fri, 19 October 2007 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: news.kasimir-k.fi

Bogdan Ribic scribeva in 18/10/2007 9:44:
> Anyway, I tried increasing all VM parameters as much as jvm would
> allow me (on a 2GB machine), eclipse.ini looks like this:
>
> -showsplash
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 256m
> -vmargs
> -XX:MaxPermSize=256m
> -Xms512m
> -Xmx512m

You are setting MaxPermSize twice there - probably not a problem but
anyway.

I've got a 2GB machine too, and my eclipse.ini looks like:
-showsplash
org.eclipse.platform
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m

which seems to have gotten rid of out-of-memories. What could be
happening is that your MaxPermSize is too close to -Xmx, so that the
heap runs out of memory.

How about either
- increasing -Xmx to 1024
- reducing MaxPermSize to 128m (which I believe should be well enough
for perm)


..k
Re: Out of memory when building PHP project [message #59266 is a reply to message #59073] Sat, 20 October 2007 16:20 Go to previous messageGo to next message
Bogdan Ribic is currently offline Bogdan RibicFriend
Messages: 13
Registered: July 2009
Junior Member
Hi Tom,

I tried lots of hacks, finaly deleted /.cache/model.dat (or something
like that, don't remember anymore) and after restarting eclipse all
worked. Though it might have been anything else I tried before that :)

Boban.



Tom Walter wrote:
> Hi Bogdan,
>
> This is a frequent and serious problem for me also. I've raised a bug:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=206109
>
> I am surprised you get it on a project with so few files, but I think it
> is just a memory leak somewhere, maybe something in one of your files is
> triggering it. I did notice a php file in the YUI library with a 1.5mb
> string which can single handedly kill PDT for me.
>
> You can sort of work around it by turning off 'Build Automatically' from
> the Project menu... but as you mentioned, if a project fails to build
> then code completion, find declaration, outlines, and most of the other
> stuff that make an IDE useful stop working.
>
> Go add your vote!
>
> Cheers
> Tom
>
Re: Out of memory when building PHP project [message #59532 is a reply to message #59266] Wed, 24 October 2007 11:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lmanic-unwanted.gmx.de

Hi Bogdan,

that worked for me too, thanks a million for that hint!! :)
The file was named /.cache/.dataModel btw.

Markus

Bogdan Ribic schrieb:
> Hi Tom,
>
> I tried lots of hacks, finaly deleted /.cache/model.dat (or something
> like that, don't remember anymore) and after restarting eclipse all
> worked. Though it might have been anything else I tried before that :)
>
> Boban.
Re: Out of memory when building PHP project [message #61718 is a reply to message #58970] Tue, 27 November 2007 22:47 Go to previous message
Eclipse UserFriend
Originally posted by: sangala.seznam.cz

Solution (helpful for me):
1.step
identify trouble project in workspace
start eclipse (ignore errors ... no close)
Close all projects
shut down eclipse
start eclipse
Open each projects (one after another)
on error stop (it is THE BAD PROJECT)
Close 'THE BAD PROJECT'
Delete 'THE BAD PROJECT' !!!!! DO NOT DELETE CONTENT !!!!!
shut down eclipse

2.step
increase memory limits
For 2Gb Ram is good idea something like:

-showsplash
org.eclipse.platform
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m

3.step
delete from project folder these files (all project setting !!!):
cache
project
settings

4.step
start eclipse

5.step
import THE BAD --GOOD FOR NOW-- PROJECT as PHP Project

?
Previous Topic:PHP Builder hangs Eclipse at Startup
Next Topic:team models
Goto Forum:
  


Current Time: Wed Feb 08 08:42:17 GMT 2023

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

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

Back to the top