Dude - nice work! I added -XX:MaxPermSize=256m to my JAVA_OPTS and
I'm now able to hammer all 5 apps with WAPT and have no memory issues.
I've been getting 8 pages per second for 15 minutes with a blip on
the error graph every 5 minutes or so.
Thanks Sanjiv!
Matt
On 4/18/06, Sanjiv Jivan <[hidden email]> wrote:> ah, did you try increasing the max perm size (-XX:MaxPermSize=256m) . Max
> Perm size is running out of memory and not necessarily the main memory.
> Class metadata stuff is placed in the perm memory (google for more deails)
> and since we're using Spring , Hibernate and Tapestry which all use a lot of
> reflection, proxying etc, its not surprising that max perm size is running
> out of memory..
>
>
>
> On 4/18/06, Matt Raible <
[hidden email]> wrote:
> > Here's what I did to reproduce the problem.
> >
> > Installed all webapps from
appfuse.org
in $CATALINA_HOME/webapps.
> > This includes all 5 AppFuse flavors, the wiki and Struts Resume. I
> > started Tomcat (5.5.16 on JDK 5) with JProfiler and all bells and
> > whistles enabled.
> >> > I completed the following sequence, starting with appfuse, then
> > appfuse-spring, then appfuse-webwork.
> >
> > 1. Login
> > 2. Click on Edit Profile
> > 3. Click Save (there's an error here in Spring+iBATIS)
> > 4. Click on View Users
> > 5. Logout
> >
> > When logging into the WebWork version, I ran out of memory and
> > received the following stack trace:
> >
> >
> > [appfuse-webwork] DEBUG [http-8080-3] UserAction.edit(92) | checking
> > for remember me login...
> > [appfuse-webwork] ERROR [http-8080-3] [jsp].invoke(704) |
> > Servlet.service () for servlet jsp threw exception
> > org.apache.jasper.JasperException: File "/webwork" not
> found
> > at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
> > at
org.apache.jasper.compiler.ErrorDispatcher.dispatch
> (ErrorDispatcher.java:407)
> > at
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
> >
> > When I tried to access appfuse-tapestry, I received:
> >
> > Apr 18, 2006 9:43:42 PM
> org.apache.catalina.connector.CoyoteAdapter service
> > SEVERE: An exception or error occurred in the container during the
> > request processing
> > java.lang.OutOfMemoryError: PermGen space
> >
> > JAVA_OPTS: -Xms256M -Xmx384M
> > CATALINA_OPTS: -Xms256M -Xmx256M
> >
> > For kicks, I tried starting Tomcat outside of JProfiler and went
> > through the same sequence of steps outlined above. I actually made it
> > through each application ... almost. I clicked logout on the last one
> > (appfuse-tapestry) and OOM:
> >
> > [appfuse-tapestry] DEBUG [http-8080-Processor25]
> UserSecurityAdvice.afterReturni
> > ng(118) | Removing 'mraible' from userCache
> > [appfuse-tapestry] ERROR [http-8080-Processor25] [jsp].invoke(253) |
> Servlet.ser
> > vice() for servlet jsp threw exception
> > java.lang.OutOfMemoryError: PermGen space
> >
> > Matt
> >
> > On 4/18/06, Matt Raible <
[hidden email]> wrote:
> > > Yes, it's a Windows box: AMD dual core 3800 (2 GHz) with 3 GB of RAM.
> > > I'll reproduce and send the files tonight.
> > >
> > > Matt
> > >
> > > On 4/18/06, Sanjiv Jivan <
[hidden email]> wrote:
> > > > I spent around around 30 mins today having all apps deployed but
> wasn't able
> > > > to replicate the issue. Can you sent the stack trace? Is this deployed
> on a
> > > > windows box?
> > > >
> > > >
> > > > On 4/18/06, Matt Raible <
[hidden email] > wrote:
> > > > >
> > > > On 4/17/06, Sanjiv Jivan <
[hidden email]> wrote:
> > > > >
> > > > > hmm, cuz I just tried my testing using one AppFuse app deployed
> > > > > (appfuse-jsf). I'll try again with all 5 deployed.
> > > > >
> > > > > Can you try replicating the OOM with only the appfuse-jsf app
> deployed?
> > > >
> > > > No, it seems to be the combo. It doesn't go down though, just keeps
> > > > climbing. I suspect there might be a sweetspot (768M or something),
> > > > but I doubt it. I suspect a memory leak in one of the combos.
> > > >
> > > > Matt
> > > >
> > > > >
> > > > >
> > > > >
> > > > > On 4/17/06, Matt Raible <
[hidden email]> wrote:
> > > > > > I have a scenario setup with WAPT that I can send. One thing to
> note
> > > > > > is that these OOM errors only show up when you have all 5 AppFuse
> > > > > > flavors installed. Or at least the ones I have on
demo.appfuse.org> -
> > > > > > which includes Spring MVC with iBATIS.
> > > > > >
> > > > > > Matt
> > > > > >
> > > > > > On 4/17/06, Mika Göckel <
[hidden email]> wrote:
> > > > > > > What about setting up a load test scenario with canoo (if this
> is
> > > > > > > possible) or JMeter.
> > > > > > > Manually clicking around didn't show up OOMs on my system
> either.
> > > > > > >
> > > > > > > Its appfuse latest CVS with jsf (tried struts as well), tomcat> 5.5.9,
> > > > > > > mysql 4.1.15 on XP.
> > > > > > >
> > > > > > > Matt Raible schrieb:
> > > > > > > > I just used a normal database created by AppFuse. The Struts
> Resume
> > > > > > > > and wiki datasets are quite a bit larger, but I took them out
> of the
> > > > > > > > mix. I'll try to come up with a more definitive way to
> reproduce in
> > > > > > > > the next day or two.
> > > > > > > >
> > > > > > > > Matt
> > > > > > > >
> > > > > > > > On 4/17/06, Sanjiv Jivan <
[hidden email]> wrote:
> > > > > > > >
> > > > > > > >> How large is your dataset? I haven't altered the default
> tomcat Xmx
> > > > > and
> > > > > > > >> still didn't get an OOM error. Its going to be difficult for
> me to
> > > > > > > >> troubleshoot without being able to reproduce the issue. Not
> sure if
> > > > > it will
> > > > > > > >> help, but maybe I can also try analysing your JProfiler
> snapshot
> > > > at
> > > > > a point
> > > > > > > >> when you're see this issue.
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> On 4/17/06, Matt Raible <
[hidden email] > wrote:
> > > > > > > >>
> > > > > > > >> On 4/17/06, Sanjiv Jivan <
[hidden email]> wrote:
> > > > > > > >>
> > > > > > > >>> Matt,
> > > > > > > >>> I'm unable to reproduce this locally. I'm on XP, Tomcat
> 5.5.16,
> > > > > MySQL 4.1.
> > > > > > > >>> Did you have a lot of data in your database? I've been
> clicking on
> > > > > links/
> > > > > > > >>> update/ sort etc for 10 - 15 minutes but the app does not
> raise an
> > > > > OOM
> > > > > > > >>>
> > > > > > > >> error
> > > > > > > >>
> > > > > > > >>> and the task manager memory footprint also reduces once I
> stop
> > > > > clicking
> > > > > > > >>>
> > > > > > > >> and
> > > > > > > >>
> > > > > > > >>> settles back to the low value after GC is done. Maybe
> someone else
> > > > > could
> > > > > > > >>>
> > > > > > > >> try
> > > > > > > >>
> > > > > > > >>> reproducing this. btw what JVM heap size are you running
> with? And
> > > > > at what
> > > > > > > >>> memory size are you running out of memory. Do you have a
> stack
> > > > > trace?
> > > > > > > >>>
> > > > > > > >> I have my JAVA_OPTS set to -Xms256M -Xmx384M. I run out of
> memory
> > > > > > > >> around 550MB +.
> > > > > > > >>
> > > > > > > >> I don't have a stack trace, but I can get one if you'd like.
> I'm
> > > > > > > >> using JProfiler when I get the error.
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>> I did notice another thing though while manually stress
> testing
> > > > it.
> > > > > > > >>>
> > > > > > > >> Clicking
> > > > > > > >>
> > > > > > > >>> on the the save button of a user reached from
> > > > > > > >>> "View Users" in rapid succession yields the following
> exception.
> > > > I
> > > > > > > >>>
> > > > > > > >> haven't
> > > > > > > >>
> > > > > > > >>> investigated this yet but this probably occurs when multiple
> > > > threads
> > > > > are
> > > > > > > >>> trying to update the record concurrently. Not sure if this
> > > > exception
> > > > > is by
> > > > > > > >>> design for Hibernate optimistic locking.
> > > > > > > >>>
> > > > > > > >> This is b/c we're using versioning on the User object. I
> left it
> > > > in
> > > > > > > >> their since it seems like a useful feature. In other words,
> it's
> > > > > > > >> expected behavior.
> > > > > > > >>
> > > > > > > >> Matt
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>> [appfuse-jsf] ERROR [http-8080-Processor23]
> > > > > > > >>>
> > > > >
> AbstractFlushingEventListener.performExecutions(300) |
> > > > > > > >>> Could not synchronize
> > > > > > > >>> database state with session
> > > > > > > >>> org.hibernate.StaleObjectStateException:
> Row was
> > > > > updated
> > > > > > > >>>
> > > > > > > >> or
> > > > > > > >>
> > > > > > > >>> deleted by another transaction (or unsaved-value mapping was
> > > > > > > >>> incorrect): [
org.appfuse.model.User#2]
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> org.hibernate.persister.entity.AbstractEntityPersister.check
> > > > ( AbstractEntityPersister.java
> > > > > :1635)
> > > > > > > >>
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> org.hibernate.persister.entity.AbstractEntityPersister.update
> > > > > > > >>
> > > > > > > >>> (AbstractEntityPersister.java
:2208)
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >> > > >
> org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert
> (AbstractEntityPersister.java:2118)
> > > > > > > >>
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> org.hibernate.persister.entity.AbstractEntityPersister.update
> > > > > > > >>
> > > > > > > >>> (AbstractEntityPersister.java:2374)
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java
> :91)
> > > > > > > >>
> > > > > > > >>> at
> > > > > > > >>>
> > > > >
> org.hibernate.engine.ActionQueue.execute
(ActionQueue.java
> > > > > > > >>>
> > > > > > > >> :248)
> > > > > > > >>
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>
> org.hibernate.engine.ActionQueue.executeActions
> > > > > > > >>
> > > > > > > >>> (
ActionQueue.java:232)
> > > > > > > >>> at
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
> > > > > > > >>
> > > > > > > >>> On 4/17/06, Matt Raible <
[hidden email]> wrote:
> > > > > > > >>>
> > > > > > > >>> All,
> > > > > > > >>>
> > > > > > > >>> Ever since I deployed 1.9.1 to
appfuse.org, Tomcat has been
> > > > spewing
> > > > > > > >>> OutOfMemory (OOM) errors. It only takes about a minute or
> two
> > > > after
> > > > > a
> > > > > > > >>> restart to get them, which really sucks. I've been doing
> some
> > > > > > > >>> profiling this evening and haven't been able to find
> anything that
> > > > > > > >>> definitive. However, it seems that Tapestry and JSF are the
> worst
> > > > > > > >>> offenders. I can add the other application flavors, and the
> > > > memory
> > > > > > > >>> usage gradually goes up as I click through the apps. If I
> stop
> > > > > > > >>> clicking, thing stabilize. With JSF, it shoots up and and
> keeps
> > > > > > > >>> climbing - almost up 150K. The heap size and stats in
> JProfiler
> > > > > look
> > > > > > > >>> good, but Windows Task Manager shows JSF supplying the
> biggest
> > > > hit.
> > > > > > > >>>
> > > > > > > >>> Does anyone have the time to profile any of the AppFuse
> flavors?
> > > > I> > > > > > > >>> can send you any information you might need.
> > > > > > > >>>
> > > > > > > >>> Thanks,
> > > > > > > >>>
> > > > > > > >>> Matt
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > >>
> > > > > > > >>> To unsubscribe, e-mail:
> > > > > > > >>>
[hidden email]
> > > > > > > >>> For additional commands, e-mail:
>
[hidden email]> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > >>
> > > > > > > >>> To unsubscribe, e-mail:
> > > > > > > >>>
[hidden email]> > > > > > > >>> For additional commands, e-mail:
>
[hidden email]> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > >>
> > > > > > > >> To unsubscribe, e-mail:
> > > > > > > >>
[hidden email]> > > > > > > >> For additional commands, e-mail:
>
[hidden email]> > > > > > > >>
> > > > > > > >>> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > > >
[hidden email]> > > > > > > > For additional commands, e-mail:
[hidden email]> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > cyber:con gmbh
> > > > > > > Mika Göckel
> > > > > > >
> > > > > > > Rathausallee 10
> > > > > > > 53757 Sankt Augustin
> > > > > > >
> > > > > > > tel (+49)2241 / 9350 0
> > > > > > > fax (+49)2241 / 9350 99
> > > > > > > mob (+49) 172 / 279 2771
> > > > > > > skype
mika.goeckel
> > > > > > > email
[hidden email]> > > > > > >
> > > > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > >
[hidden email]> > > > > > > For additional commands, e-mail:
[hidden email]> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > >
[hidden email]> > > > > > For additional commands, e-mail:
[hidden email]> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > >
> > > > To unsubscribe, e-mail:
> > > >
[hidden email]> > > > For additional commands, e-mail:
[hidden email]> > > >
> > > >
> > > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
>
[hidden email]> > For additional commands, e-mail:
[hidden email]> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]