Hack Forums
My site takes a minute to load, but once loaded, it's fast - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50)
+---- Thread: My site takes a minute to load, but once loaded, it's fast (/showthread.php?tid=5907093)



My site takes a minute to load, but once loaded, it's fast - GramHQ - Nov 13, 2018

I'm hosting my site on a digitalocean vps. This problem has occurred before and fixed when I switched to a new server. However it's back, and I don't wanna have to switch server for this to happen again in a months time.

https://gramhq.com/ It takes ~40 seconds to load, but once loaded, it works fine.

Does anybody know what the cause may be?
I tried installing a backup from when it wasn't loading slow, it was the exact same, took ~ 40seconds to load initially.


RE: My site takes a minute to load, but once loaded, it's fast - Nachfolger - Nov 13, 2018

Digitalocean is a great company. It's not the VPS itself.

What services do you have between the domain and the host, Cloudflare/Etc? I have a strong feeling we're looking at a DNS issue, because otherwise you could easily replicate it by purging or blocking the website cache. I'm also wondering if you have the LAMP stack or some alternative, which shuts the web server off to save resources when it's not being accessed?

Edit: Have you tried accessing the website via the dedicated IP address Digital Ocean assigned you? Perhaps you could try that for a day or two. If the issue no longer persists, you have confirmed it's at the domain/DNS level. From there, debugging is going to be a bitch.


RE: My site takes a minute to load, but once loaded, it's fast - sdk - Nov 13, 2018

Accessing your site via the direct IP seems to load just a slow, so it must be something todo with the way your VPS is setup. I do recommend switch to Cloudflare aswell just to help cache some things seeings as your sites is quite static. But it does seem to be a direct issue with the VPS. Check your logs.


RE: My site takes a minute to load, but once loaded, it's fast - realsunjester - Nov 13, 2018

113ms load time for me, idk


RE: My site takes a minute to load, but once loaded, it's fast - Nachfolger - Nov 13, 2018

(Nov 13, 2018 01:31 PM)realsunjester Wrote:  113ms load time for me, idk
I just visited the site like 1 minute ago, preceding your visit. The load time was 15 seconds.

OP: I think the webserver or VPS is going into idle or shutting off entirely to conserve resources. I don't recall Digitalocean offering any service like this, perhaps you have something installed on your machine. Reminds me of what https://www.heroku.com/ does.