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 ( 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 ( without success so far.

Job Type
How to Apply
Via email