Sometimes our WordPress installation may make excessive use of admin-ajax.php, consuming a large amount of the server’s available resources and overloading it.
This file comes by default with our WordPress installation as it is part of the core, and its function is to allow communication through AJAX requests thanks to the WordPress Heartbeat API. For example, it enables communication between certain plugins, themes, autosaving of posts and pages, etc.
In general, this should not affect the performance of our installation. However, when additional plugins and themes are installed, combined with website traffic, it may generate requests at very short intervals.
Our recommendation is to limit these connections so they are not so frequent and to leave a time gap between them. To do this, we can install the Heartbeat Control plugin.
To do so, go to Plugins and Add New:
Next, in the search bar, look for the Heartbeat Control plugin as shown below:
Once the plugin is installed, go to Settings > Heartbeat Control:
Then configure it to limit the Heartbeat across the entire website except on post editing pages, and set the interval to 60 seconds, as shown in the image below: