AAM Complete Package: 5.0.7 and 5.0.8
Kinsta support with NewRelic data has provided us with this information:
So what I could find out so far is that the AAM-related functions are not displaying any PHP-level errors. This means, that the functions are not causing any PHP Fatal errors or panics, meaning the code itself is not conflicting with the entire WordPress application.
But when we check the load distribution amongst all plugins and themes, we can see that the AAM plugin is using the most resources by far and taking the longest to load. These numbers are the combined numbers of load time during the time New Relic has been active so far.
As you can see here, this plugin does not compare at all to all the other active ones. It is using almost all the available resources and taking therefore the longest to load on most pages where the plugin is involved in loading.
The plugin itself is running a function named AAM_Autoloader::load 69 times, this then is in turn loading two other functions - AAM_Core_Subject::getObject and AAM\AddOn\PlusPackage\Main::objectFilter - over 300 to 500 times in most instances.
The problem here seems to be the amount of requests created simultaneously. Say two visitors are opening up the same page where these functions run. Each page is now opening up around 900+ PHP requests. Most of the requests are very fast, meaning they are finished way under 1 second, but in sum this taking a very long time to load. Your site has 16 PHP workers, meaning it can handle 16 PHP requests per second. Since this plugin is creating so many requests, the workers are getting into a situation where they have to wait for finished requests very frequently, causing delays and timeouts in the worst case.
When you check the complete function rundowns of pages where the plugin loads, you can see that the plugin is responsible for 90+% of the entire load time:
This is the entirety of the information we have on the plugin and its functions.