Just upgraded to CiviCRM 5.54.1, on WordPress 6.0.3 (self-hosting on a virtual private host running CentOS 9, PHP 7.4.32 using php-fpm). For a really long time now, I think since the beginning to be honest, there's been a roughly 25 second delay after a user clicks login before the login is accepted and the login page starts to be processed on the server. Once that happens things are quick.
Browser debugging has the wait squarely on admin-ajax.php. Enabling custom logging on my SSL request log confirms that the request to that URL takes 30 seconds on login (most of the time it's logged as 0 seconds, as it only logs in units of integer seconds).
It's not OS resource related, it's not traffic related. I don't think it has anything to do with database performance as there isn't much traffic or activity at all, and no SQL queries are showing as suspicious (unable to tell if there are just a bajillion of them adding up with my view though). I can't find anything in any error log even with debugging turned on that helps me figure out what's going on.
Disabling the CiviCRM plugin causes logins to be instantaneous. Re-enabling brings back the login delay. While I know that the two WordPress tests around REST API timeout and active PHP session are deemed harmless and there are posted workarounds to disable those tests, I can't help but wonder if while the tests may be testing the wrong thing, the underlying issue may be valid.
Searched this group and the internet in general several times, trying different search terms, to no avail. No help on the WordPress StackExchange group either.
So, does anyone have any ideas what it may be or how I could narrow the culprits down a bit?
Thank you.
Michael