Hello,
First of all, I'm not a progammer.
Because Site5 hosting arbitrarily changed A records without notifying us with some frequency and we had a lot of performance issues we moved two MODX based sites (each with 3 contexts) to A2 (A2 did a cPanel based migration from Site5).
Note: Both MODX based installs are up to date at 2.6.5 and Extras updated before the move.
Logged in the first time and everything was much faster.
However, an issue has arised that I cannot solve.
If we visit a context that is not the "web" context but another one with the correct Context Settings, ie.
base_url: /
http_host: domain.com
site_url:
http://domain.com/
Obviously with real domains. The additional domains are Aliases in cPanel that point to public_html. At first was using ContextRouter for routing to contexts but have replaced it with xRouting. We have of course changed the A record for each domain to point to the new server.
Every context renders so we know that the A records are fine and redirecting to the correct context is at least partially fine.
But the issue is if we visit a URL for a context that is not "web" the server's CPU and Memory skyrockets and the sites eventually return a 500 error until after a few minutes when the server goes back to normal (we usually close the page we visited as well). When we go to the other context, of course, it's very slow right way, often refusing to render images.
So I'm thinking there has to be an issue with routing but I can't figure out what it is.
The main differences between the old server are:
PHP 7.1 instead of 5.6
Let's Encryt SSL is automatically installed
And the following was added to the standard MODX .htacess:
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
I commented them out but this made no difference.
MODX error log shows nothing.
On the other MODX install on A2 (different account then the other), when a user logs into the manager using a non "web" context again the server's CPU and Memory skyrockets and the sites eventually return a 500 error until after a few minutes when the server goes back to normal.
At first we thought it was bots hitting the sites in bulk but have use robots.txt to deny most of them.
My suspicion is it has something to do with the free SSL but we aren't trying to use https:// in any of the above situations.
Anyone have any ideas or have had a similar experience?