How to stop admin-ajax from overloading your WordPress site

The WordPress Heartbeat API is used to have WordPress to connect between your web browser and the WordPress script or server. It is also used for session management, revision tracking, and auto saving. The WordPress Heartbeat API uses the file /wp-admin/admin-ajax.php.

The issue is this file can also cause excessive requests to admin-ajax.php, leading to high load and CPU usage. If a web browser is left open on a page using the Heartbeat API, this could potentially be a major issue.

The best solution is to remove it, or as a alternative you can change it only run every 60 seconds.