It's hard to say for sure what the problem is without more information but
you can try adding things like the below methods to help your startup times:

-) Increase or add the initial heap memory size via command line -Xms224m
(or whatever seems appropriate) .

-) Increase your perm gen space size - this will be critical for all of the
javassist compilations that happen when initially loading up pages /
components. -XX:MaxPermSize=99m

-) Make sure you don't have caching disabled of course. ;)

Not sure what else there is. I know there are a few unnecessary
synchronized() lock calls in a few places that were added to fix some issues
related to dev mode problems (ie caching being disabled) - but I've been
slowly removing them here and there when I notice them. Maybe I should just
do one big sweep of all usages to be sure.

On 4/24/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote:

Maybe that's a FAQ that I overlooked somehow, but a google search
wasn't helpful in solving the problem below...

I have a busy application running on Tapestry 4.0.2 / Jetty 6 / JDK
1.5. On startup the JVM would sometimes crash overwhelmed with
requests. If it survives for the first 1-2 minutes, it warms up and
runs just fine thereafter. I was able to take thread dump right
before it crashed (see below). Most request threads (there's about a
hundred per JVM) are being stuck waiting for shared resources,
somewhere down PageLoader stack.

So it would be nice to eagerly warm up Tapestry stack. I tried eager-
loading PageLoader service, but I guess this doesn't load needed
dependencies, as I got a bunch of startup errors for the following
configuration:

<contribution configuration-id="hivemind.EagerLoad">
      <load service-id="tapestry.page.PageLoader" />
</contribution>

So my question is: how can I init Tapestry services eagerly from
within the ApplicationServlet.init(), before the gate is opened and
requests start to come in? I can probably hack some kind of startup
filter that throttles the first N requests, but I hope there's a
"standard" way of handling that.

Any insights are appreciated.

Thanks
Andrus



      at org.mortbay.jetty.webapp.WebAppClassLoader.getResource
(WebAppClassLoader.java:221)
        <sniupped>




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to