users@glassfish.java.net

Re: 30 second delay on website

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 11 Mar 2008 16:43:22 -0400

Hi,

glassfish_at_javadesktop.org wrote:
> For some reason I am getting a delay on a website, and I think it has something to do with a timeout setting somewhere in Glassfish.

Yes, the keep-alive timeout


>
> If I visit the site, it will take exactly 30 seconds to display the fully loaded page.


Which browser are you using? Under the hood, the browser will open a
connection, sent a request and should send a reponse almost immediately.

  If I keep clicking links, it will instantly return completed pages.
If, however, I wait longer than 30 seconds and then try to click another
link, it will stall for 30 seconds before serving the page.

Strange. Which version of GlassFish are you using?

>
> So basically, I can click links all days and get there instantly, as long as I don't wait more than 30 seconds before clicking the next link.

If you open ${glassfish.home}/domains/domain1/config/domain.xml

and look for <keep-alive ... timeout-in-seconds="30"/>

and reduce the value, does it wait the same amount of time?


>
> What is causing the 30 second delay in serving pages, and why does it seem to revolve around waiting for 30 seconds?

Looks like the brower is expecting the final bytes from the server, and
spin until Grizzly (the http front end) decide to close the connection.
When Grizzly close the connection, the browser just display what he has
read so far.

>
> Is this just the JSP compile time, and if so, why does it need to recompile after 30 seconds of inactivity?

No that shouldn't be the problem. But do you have the same delay with
static pages as well?

Let's start debugging :-)

-- Jeanfrancois

> [Message sent by forum member 'malakh' (malakh)]
>
> http://forums.java.net/jive/thread.jspa?messageID=263435
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>