New Server - Slow Site Loading
AnsweredI have a brand new AlmaLinux 9 server with 8Gb RAM and 4 CPU cores.
We only use it for our own sites of which only 2 have any sort of serious activity.
We don't use it for mail and our MySQL server is separate, it's purely for web hosting.
The problem I'm having is that sites are really slow to respond, but when they finally do, the whole page loads quite quickly.
It's not a PHP problem because even a simple "Hello world" html file behaves the same way.
I've disabled CSF and it made no difference, I've played around with PHP buffering but it made no difference and as I say even a static html file behaves the same way.
It doesn't seem to be a bandwidth problem because pages behave the same way even when accessed from our local network .
The CPU load is generally minimal, we do have occasional spikes but this behavior occurs even when the load is low.
Could this be an Apache configuration problem?
-
I think I've worked it out: my /etc/resolv.conf file had been changed and had a wrong IP in it.
As soon as I corrected the IP, the lag disappeared.
I've made /etc/resolv.conf immutable so it can't be changed again.
chattr +i /etc/resolv.conf
0 -
Hey there! I'm glad you found the issue - odd resolvers can slow things down for sure, and I'm glad that's all it was!
0
Please sign in to leave a comment.
Comments
2 comments