jwdenzel Posted May 17, 2021 Posted May 17, 2021 My website, dragonmount.com, is slow to load. There's an initial long delay of about 6-12 seconds, and then the entire site rushes and loads quickly. This has been driving me crazy because I can't figure out where the delay is coming from. The IPS application is installed onto a local server. The MySQL database is installed on a different server. The two servers (app + db) are connected to the same switch. Easy networking. Fast ping times. At this point, I wonder if the initial delay described above is due to the server making a request to the DB. Could that be it? How do I track it down? Does IPS make a single, persistent connection or does it us a new db connection for every request? Either way, the issue does not occur with the ACP. The ACP loads much faster. Ideas?
Jimi Wikman Posted May 27, 2021 Posted May 27, 2021 Do you by any chance have Cloudflare configured for this site, or tried it at one time? It looks like the frontend does not resolve properly and it actually takes 7 seconds for the server to respond. Once it responds things looks very fast, but there is something going on that locks the request for a while before it can get the server to respond. jwdenzel 1
jwdenzel Posted June 15, 2021 Author Posted June 15, 2021 Hi @Jimi Wikman: Thank you so much for your reply. I wasn't notified of it by email so I just saw it now. Yes, I do have Cloudflare. I would love if the answer to this problem was that CF wasn't configured properly. Any advice? I've been banging my head against a wall for months over this. I don't know where that 7-second delay is coming from. Even if I put the Cloudflare DNS into bypass mode, and also put it into "Development mode" (ie, bypass cache, etc), it still has the delay. Thoughts?
Jimi Wikman Posted June 16, 2021 Posted June 16, 2021 There is something with the server that takes a very long time. The dns and ssl resolve look fine, but then it takes the server ages to respond. So I think you need to do internal checks to see what happens after the server get the request. I am guessing there is a latency in the resolve and also the database connection is probably slowing things up. Check the internal connectivity and make some tests to see just how fast things move after the initial request.
CoffeeCake Posted June 16, 2021 Posted June 16, 2021 Are you providing an IP address as the MySQL address or a hostname in your conf.php file?
jwdenzel Posted June 16, 2021 Author Posted June 16, 2021 13 hours ago, Jimi Wikman said: So I think you need to do internal checks to see what happens after the server get the request. I am guessing there is a latency in the resolve and also the database connection is probably slowing things up. Check the internal connectivity and make some tests to see just how fast things move after the initial request. Thanks, Jimi, I appreciate your time and advice. My servers run on Antlse hardware, which is kinda cool, but yeah, I wonder if if's getting tripped up on name resolution or something else. Maybe my vhosts config is wonky or something. Or maybe the server is just getting overwhelmed? The stats look good though so I dunno.
JustinHawk Posted June 17, 2021 Posted June 17, 2021 I once used this to fix issue with connection issues to remote MySQL, it's useful in case u have high amount of traffic, you may try this > https://linux.die.net/man/8/tc-sfq jwdenzel 1
jwdenzel Posted June 18, 2021 Author Posted June 18, 2021 I've resolved the issue. You won't believe what it was. I upgraded to 4.6. Memcache is no longer supported so I disabled all server-side caching. Result: the website is incredibly faster. Like, not even kidding you, 50x faster. Memcache must not have been set up wrong or was otherwise messing things up. The site is blazing fast now. (I use Cloudflare for CDN caching, but even with that disabled, it's fast). Thanks for all the advice! (cc @Jimi Wikman)
Jimi Wikman Posted June 19, 2021 Posted June 19, 2021 On 6/18/2021 at 7:52 PM, jwdenzel said: I've resolved the issue. You won't believe what it was. I upgraded to 4.6. Memcache is no longer supported so I disabled all server-side caching. Result: the website is incredibly faster. Like, not even kidding you, 50x faster. Memcache must not have been set up wrong or was otherwise messing things up. The site is blazing fast now. (I use Cloudflare for CDN caching, but even with that disabled, it's fast). Thanks for all the advice! (cc @Jimi Wikman) nice! Glad you got that sorted 🙂
rfcontreras Posted September 15, 2021 Posted September 15, 2021 Use mysql cache, I use Mariadb (a mysql fork) and even if they tell you that it's not worth, my site fly.
Recommended Posts