Current time: 10-23-2020, 12:28 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TTFB constantly fluctuates from sub 1s to minutes long
10-11-2020, 01:55 PM
Post: #1
TTFB constantly fluctuates from sub 1s to minutes long
This has been driving me crazy all day.

Results for homepage: https://www.webpagetest.org/result/20101...ffb27c297/

Sometimes, the site will work perfectly, returning pages in less than a second. Other times, random static assets will hang for over a minute, the page won't first byte for 30-60 seconds, or the connection will poop out completely and CloudFlare will pop up a 520 error page.

The site is hosted on a cloud VPS. top shows very low CPU usage, disk space/quota isn't close to being fully used, and upgrading memory doesn't seem to affect the issue whatsoever. Site traffic is low and bandwidth isn't being saturated at all.

Even requesting blank static assets sometimes takes up to 6-10 seconds for TTFB, seemingly at random.

Any suggestions?
Find all posts by this user
Quote this message in a reply
10-15-2020, 03:33 AM
Post: #2
RE: TTFB constantly fluctuates from sub 1s to minutes long
It looks like in Run 1 both of those requests for static assets (requests 38 and 46) were edge cache misses (See the Response tab on request 38 for example, it contains a response header of CF-Cache-Status: MISS) so hit the origin server(s). In the other runs, it looks like the static assets have a mix of cache hits and misses, but sometimes the misses take a long time.

Maybe consider looking at your origin access logs or webapp logs to see if they can give you more insight into what may be happening and where. If there are multiple VMs/processes serving traffic, it could be that one is having issues serving. In several of these runs, it looks like the first request, the dynamic request to the homepage is also periodically taking multiple seconds which seems to indicate an origin issue.

Are static assets served as static assets from the webserver or are they part of a web application? If served from disk, tuning is likely going to focus on the webserver itself, OS, network, etc. If from the web application.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)