Fresh server has weird serve delay
So I am switching our website from AWS to Digital Ocean for cost reasons and so I got the 160 option from Digital Ocean which is about 40% larger than our current server. Setup Apache, Composer, Laravel and httpd.conf files exactly how my main server is setup. However whenever going to any webpage the new Digital Ocean server has a weird 0.5-1 second delay. I would normally just chalk it up to performance but If i go to our about page (no images, loads almost instantly etc) from the AWS server it loads instantly. From the digital ocean server it has a noticeable 0.5-1 second delay. However I do not think this is necessarily CPU/RAM related. I also have a function that takes 1-2 seconds on the AWS server and it takes 1.5-3 seconds. I feel like I might be missing some sort of apache config setting or something. Anyone know what would cause this delay?
As for the obvious questions, CPU / Memory load are at about 1-2% since i’m the only one on the site. Restarting apache seems to have no effect. Both are connected to a remote sql server.
If nothing else maybe you guys could point me in the direction of some httpd.conf files that are optimized for laravel.
Edit:: Note it is not just php files, I tried loading an image that was on both servers, the AWS server responded within 190-220 ms 10/10 times. Whereas Digital Ocean was about 350-440
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.