The WordPress Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the web-browser. While this is great and all it can also cause high CPU usage and crazy amounts of PHP calls. For example, if you leave your dashboard open it will keep sending POST requests to this file on a regular interval, every 15 seconds. Here is an example below of it happening.
We have three options built into the plugin to help minimize this:
- Leave as default
- Disable completely
- Only Allow When Editing Posts/Pages
We recommend the last one and that is the setting we use on our sites. This is will drastically decrease the number of requests.
Make sure to also check out our other option to change the Heartbeat API frequency.