Server is failing to asynchronously serve files? Extremely bad performance when embedded videos are present on page.
I am in the process of slowly setting up a replacement cPanel/WHM server to move all of hosting to from a server that was compromised last month. Every time i get close to prime time for the full migration another test seems to fail. This time we deployed a brand new WordPress site to the new server rather than deploying it on our old server, and immediately we had problems. The first ~30% of the front page's source code loads, and then it hangs for 5 minutes before finishing.
In my testing I found that there was a locally hosted video file embedded on the front page and it took roughly 5 minutes to download. Sure enough, removing the embed causes the site to load nearly instantly.
In the interim we loaded this site on the old cPanel server as the customer was hot to have it up. It works flawlessly as expected on there, video embed and all.
So I started poking around with firefox dev tools and recording performance and network requests, but nothing seems out of the ordinary and I don't see any sort of error listed. After more testing, it seems like up until i request a page with the video embedded, the site works fine. I can load up a few tabs and it all works. As soon as that video file is requested, ALL requests to that domain are hung up and waiting on the video to finish downloading. All subsequent tabs, etc. If I go over to another machine while the first machine is still loading the site it seems to work ok until once again I request a page with the embedded video. So it seems that per client, everything works until the video file is requested and then suddenly all requests for that client are somehow queued up behind the video.
I have no idea what I may have done to cause this behavior, and it just seems highly bizarre, but I would really like to get it sorted out as we really need to get off that old server as soon as possible.
-
Hey there, I'm not sure I'm going to be of much assistance on this one, since the type of content you are serving won't be related to any cPanel settings. One thing that may be worth checking is that you have a similar Apache and PHP configuration on the new machine as on the old one. You can actually move the entire EasyApache configuration over to the new system directly in the WHM >> Transfer Tool with just a few clicks, which is outlined in our documentation here: 0 -
I actually did transfer all configs, but I made a few changes: - PHP 70 and 71 removed, PHP 80 added
- mod_security2 added (but also tested with it removed)
- mod_mpm_worker removed and mod_mpm_prefork added
- mod_suexec and mod_suphp removed and mod_ruid2 added
0 -
Based on your description I'm not completely sure what could have happened with that. If you see something similar happen in the future it would be good to see if there are any logs written to the /etc/apache2/logs/error_log file on the system that may provide more details. 0 -
I did check the error logs at the time but there was nothing that seemed to match up with what I was experiencing. Parsing through it again now, the only entries I see from Friday that are not expected are quite a few "Request exceeded the limit of 10 internal redirects" but I am not sure which site that references on the server and the client IP for those log entries are not my IP, so i think it was some other site/request. In fact, there aren't any error log entries logged for a connection to my IP. This server has a bunch of old internal sites that were migrated as test subjects and it wouldn't surprise me if one of those is entirely broken but still getting hit by crawlers. 0 -
The "exceeded" error you mention would usually happen due to a misconfiguration inside the .htaccess files on the machine, but you'd see that specific error in the browser if that was the case. No matter what, I am glad things are working well at this point. 0
Please sign in to leave a comment.
Comments
5 comments