Stop WordPress query from getting stuck

My WordPress site keeps having the following query getting stuck and causing all apache connections to be stuck in ‘waiting reply’, eventually causing websites to not load:

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_author IN (1) AND wp2a_posts.post_type = ‘post’ AND (wp_posts.post_status = ‘publish’) ORDER BY wp_posts.post_date DESC LIMIT 0, 3

I have been having website downtime issues for weeks (https://serverfault.com/questions/992850/apache-connections-stuck-on-sending-reply-and-high-mysql-load) and I believe that this query getting stuck is the primary culprit. This project is to do whatever is necessary to stop this query getting stuck, and if that means stopping it from running completely at the cost of no pagination that is fine. There are several websites I am having this issue for, but this project is to just look at 1 of them and solve it for 1 site (then I can likely apply the solution to every site facing the issue).

I have tried to make it so this query doesn’t need to be run (https://WordPress.stackexchange.com/questions/353155/stop-all-sql-calc-found-rows-WordPress-queries) without success so far.

Company
CE
Job Type
Project
Location
N/A
Budget
300
How to Apply
Via email