aspose file tools*
The moose likes Tomcat and the fly likes sudden delay in home page load Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "sudden delay in home page load" Watch "sudden delay in home page load" New topic
Author

sudden delay in home page load

J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1043
    
  13

Maybe this belongs in the performance forum, or maybe servlets. Please move as needed. The issue is, our home page is suddenly running slower and there have been no changes to our configuration nor have there been any major changes put into production. But our home page has gone from taking about half a second to load, to taking over 10 seconds.

I've attached a screen shot of the Firebug get request. It doesn't tell me much. The tomcat logs don't indicate a problem. Lambda probe shows that memory and thread usage is normal. Very low in fact. CPU utilization seldom goes over 5%.

Can anyone advise me on how to troubleshoot this issue?



[Thumbnail for net-capture.JPG]



"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Aniruddh Joshi
Ranch Hand

Joined: Jul 29, 2008
Posts: 275

The bottom of firebug request break-up shows some time taking things.
Some png and java script files.
Did someone by any chance change the caching mechanism for JS and images?
Are you using a portlet server like liferay.. I faced such issues once when we had confugured images and javascript files incorrectly.

These servers allow you to compress png files to save bandwidth. Also compressing javascript files is an option to reduce data transfer.

Anrd
"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1043
    
  13

No changes in caching that I'm aware of and we aren't using a portlet server. I also notice that style.css and Styles.css seem to be a bottleneck. Those are legacy files that contain nothing but a single CSS rule for root:display=block. I don't think they are even used in our application anymore.

I renamed them and the page seems to be back to it's normal load time, but I have no idea why such a small css file would have that dramatic effect.
Aniruddh Joshi
Ranch Hand

Joined: Jul 29, 2008
Posts: 275

Running a load test on the page will be helpful, a tool like Open STA can hit the page multiple times and will show average/min/max time taken.
This test can save you surprises.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Wow. You've got some REALLY long load times for some really small javascript files! Did I spot 10 seconds for something like 158 bytes???

I see that a whole bunch of them drag and drag and then all slam in at once.

Tomcat doesn't do much magic with files like that, so the bottleneck is probably external. Although you claim that there's more than enough RAM, make sure that it's real RAM and not virtual, as a sudden inrush of paged memory is one possibility. Although that usually shows up as a CPU spike.

It's possible that the real problem isn't even in the server machine itself. Have you checked to see if there are heavy demands running elsewhere on the same network?


Customer surveys are for companies who didn't pay proper attention to begin with.
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1043
    
  13

I've narrowed this down to an asp page that is being displayed in an iframe. That little css file (style.css) is on the asp server. I haven't worked with iframes so I don't know if the external page is supposed to carry it's included js and css files with it, but when I created that css file on the local tomcat server that started this whole debacle.

I'm going to read up on iframes and do some testing, but it seems I shot myself in the foot with this one. Best intentions and all that...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

IFrames wouldn't make a difference. Every link on a web page is handled as a separate server request, whether it's a form. a gif, a css file or javascript file. Nor is there any restriction that says that all of the various sub-requests be made to any single server or set of servers. You can - and some do - literally assemble a web page from sources all over the world, as you can see if your browser displays the resource names (such as akamai.net) as they're being fetched. Mixing http and https requests on a page will make IE yell at you, but that's for security concerns, not performance.

So you can ignore the page context. What's killing you is fetching those particular items, and they should come back at the same speed whether they're requested from a web page or via a direct URL request of their own.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Based on that attachment you posted, it does show a pattern that most of the things served from within your local tomcat instance is extremely slow as compared to what's served from that 10.x.x.x host. Are you sure you don't have any firewall or anti-virus or any similar stuff on that local instance which might be interfering with these requests?


[My Blog] [JavaRanch Journal]
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1043
    
  13

The frustrating thing about this problem is that it comes and goes. Yesterday at one point it took 3 minutes to load the page. A few minutes later it was back to sub-second load times.

We've bounced the ASP server, and I'll check the TCP/IP settings to make sure we have an exception setup for that host so it's not trying to go through the proxy server.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Without knowing the full URLs of these resources, I cannot say for certain, but it certainly looks like similar resources were loading just fine, then all of the sudden, something slammed everything.

I'd get the network monitored. You may have a traffic spike clogging up things.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sudden delay in home page load