Skip to main content

30 second delay on website

5 replies [Last post]
malakh
Offline
Joined: 2008-02-15

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.

If I visit the site, it will take exactly 30 seconds to display the fully loaded page. 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.

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.

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

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

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jeanfrancois Arcand

Hi,

glassfish@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

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@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

malakh
Offline
Joined: 2008-02-15

JF -

I think you are right with your idea about the browser waiting for the final bytes to return, which would explain why Windows will return the page immediately (with no delay), but the page is not 100% completely loaded, while Linux and Leopard OS X will wait the 30 seconds and return a (usually) completed page.

I haven't tried the keep alive timeout change yet, but I will tomorrow when I get into the office.

And yes, this delay happens on a static page as well.

You can test this out yourself at https://www.nationalkeybilling.com.
To recreate: Visit the site. You should get the 30 second delay immediately while waiting for the front page to load. Once there, you hould be able to navigate anywhere with no delay. If you wait 30 second, then try to navigate again, you will experience the delay.

Oh, and Glassfish version is V2 (SJSAS 9.1 update 1)

Jeanfrancois Arcand

glassfish@javadesktop.org wrote:
> JF -
>
> I think you are right with your idea about the browser waiting for the final bytes to return, which would explain why Windows will return the page immediately (with no delay), but the page is not 100% completely loaded, while Linux and Leopard OS X will wait the 30 seconds and return a (usually) completed page.
>
> I haven't tried the keep alive timeout change yet, but I will tomorrow when I get into the office.
>
> And yes, this delay happens on a static page as well.
>
> You can test this out yourself at https://www.nationalkeybilling.com.

Interesting. I think you might suffer the following issue:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=4035

Can you edit ${glassfish.home}/domains/domain1/config/domain.xml

and remove the following line

> To recreate: Visit the site. You should get the 30 second delay immediately while waiting for the front page to load. Once there, you hould be able to navigate anywhere with no delay. If you wait 30 second, then try to navigate again, you will experience the delay.
>

Nice site :-)

A+

-- Jeanfrancois

> Oh, and Glassfish version is V2 (SJSAS 9.1 update 1)
> [Message sent by forum member 'malakh' (malakh)]
>
> http://forums.java.net/jive/thread.jspa?messageID=263703
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

malakh
Offline
Joined: 2008-02-15

FIXED!!

Removing the proxiedProtocols="http" property from my SSL http-listener worked!

Although it should be noted that I only added that property at YOUR advice:
http://forums.java.net/jive/message.jspa?messageID=204582

;-)

Thanks again Jean Francois

malakh
Offline
Joined: 2008-02-15

Update: For some reason, Windows does not have this problem.

I used IE and Firefox from Windows, and there was no delay in loading pages after 30 seconds.

I used Safari and Firefox on Leopard OS X and got the 30 second delay.

I used Firefox on CentOS and got the 30 second delay.

Any ideas?