Introduction
When there are admin-ajax.php queries that take a substantial amount of time, there is no easy way to debug these requests.
Debugging admin-ajax.php Options
Query Monitor
You’d think that installing the Query Monitor plugin would work, however this isn’t yet functional.
Newrelic
You can always install Newrelic, since it’s a PHP module it will capture all PHP executions.
Xdebug
Same as newrelic, you can use xdebug as it’s a PHP module.
apt-get install php8.0-xdebug # check if file exists vi /etc/php/8.0/fpm/conf.d/20-xdebug.ini # add xdebug.mode = debug, profile xdebug.start_with_request = trigger # restart service service php8.0-fpm restart
Conclusion
This page is a placeholder until I can document it further. Comment if you have better ideas.