I've had good success with java's built in tools.  More info here:
http://blogs.sun.com/alanb/entry/heap_dumps_are_back_with

On Sat, Mar 13, 2010 at 10:10 AM, David Fuelling <[email protected]> wrote:

> Hey Max,
>
> Thanks for your reply!  I tried to install the eclipse memory profiler
> (TPTP --
> http://www.eclipse.org/tptp/home/downloads/installguide/InstallGuide42.html#install_update_manager
> )
> but for whatever reason there seems to be a conflict with the Google
> Eclipse plugin because now there's no sign of the Google plugins in my
> eclipse install.
>
> I see that the Google plugin and the GWT/GAE plugins are installed (in
> the installed software window), but I can't access these at all,
> either from the button menus or the configuration menus.  It's as if
> Eclipse now things my projects is a regular JavaEE project instead of
> being a Google Plugin project.  The Google plugin config menus don't
> show up in any context menus, or in the project config menus.
>
> I'm currently reverting my eclipse configuration to see if I can
> restore things.
>
> Meanwhile, can you recommend a good memory profiler that I could use
> with the GAE/Google plugin?
>
> Thanks!
>
> david
>
> On Mar 12, 9:37 pm, "Max Ross (Google)" 
> <[email protected]<maxr%[email protected]>
> >
> wrote:
> > Thanks for the report David, this certainly seems suspicious.  There is
> at
> > least one memory leak I'm aware of but it's related to transactions so
> > that's probably not what you're bumping into.  Have you tried taking a
> heap
> > dump to see what exactly is building up?
> >
> >
> >
> > On Fri, Mar 12, 2010 at 1:27 PM, David Fuelling <[email protected]>
> wrote:
> > > I have a JUnit test class that is attempting to test some JPA
> > > datastore "create" operations, and I'm getting results that *seem* to
> > > indicate a memory leak in the EntityManagerFactory (?)  Basically, if
> > > I use "test1a" (see below), the heap in use by the JUnit test process
> > > continually increases until the JUnit test fails with an OutOfMemory
> > > error.  Test1b suffers from no such problem.
> >
> > > I would not expect this type of behavior from test1a because even
> > > though I'm creating a new EntityManager upon every for-loop iteration,
> > > that "em" should go away after every for-loop iteration since the
> > > variable reference is replaced with a new EntityManager each time.
> >
> > > Now, one might argue that my test is just going too fast, and the GC
> > > isn't getting a chance to Garbage Collect.  However, Test1a takes a
> > > pretty long time to execute on my machine (> 120 seconds), so I
> > > *should* be getting some GC, right?  Unless the EntityManagerFactory
> > > is holding onto a reference to each created EntityManager?
> >
> > > Any input here would be much appreciated...
> >
> > > Thanks!
> >
> > > david
> >
> > > ps - my "UserImpl" is a standard JPA entity.
> >
> > > ///////////////////////////////
> > > //Begin JUnit Test #1a
> > > ///////////////////////////////
> >
> > > User user = null;
> > > EntityManager em = null;
> > > for (int i = 0; i < 5000; i++)
> > > {
> > >  //See how I get an em here:
> >
> > >http://code.google.com/appengine/docs/java/datastore/usingjpa.html#Ge.
> ..
> > >  em = EMF.get().createEntityManager();
> > >  user = new UserImpl("test" + i);
> > >  em.persist(user);
> > >  em.close();
> > > }
> >
> > > ///////////////////////////////
> > > //End Test #1b
> > > ///////////////////////////////
> >
> > > ///////////////////////////////
> > > //Begin JUnit Test #1b
> > > ///////////////////////////////
> >
> > > User user = null;
> > > EntityManager em = EMF.get().createEntityManager();
> > > for(int i = 0; i < 5000; i++)
> > > {
> > >  user = new UserImpl("test" + i);
> > >  em.persist(user);
> > > }
> > > em.close();
> >
> > > ///////////////////////////////
> > > //End Test #1b
> > > ///////////////////////////////
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine-java%[email protected]><google-appengine-java%2B
> [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to