A lot of queries spawned on the server

Posted in: Newspaper
Post count: 11

I noticed a problem with our website database.

There are a lot of queries that are spawned and they allocate a lot of server-side resources – as a result of that, the server is working very slowly and I had to reboot it.

Following is the database query repeating multiple times.

wp_posts AS p
INNER JOIN wp_term |
| 1063
| Query | 103 | executing | SELECT p.*, COUNT(tr.object_id) AS counter

We cannot properly investigate the issue with the 404 pages as the website is not loading properly.

Post count: 11

SELECT p.*, COUNT(tr.object_id) AS counter FROM wp_posts AS p INNER JOIN wp_term_relationships AS tr ON (p.ID = tr.object_id) INNER JOIN wp_term_taxonomy AS tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE 1 = 1 AND (tt.taxonomy = s AND tt.term_id IN (“i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”, “i”)) AND p.ID <> i AND p.post_status = s AND p.post_date_gmt < datetime AND p.post_type IN (s, s) GROUP BY tr.object_id ORDER BY p.post_date ASC LIMIT 0, 6

Post count: 35449

Hi muzaffarab,
Unfortunately, from this query alone we can’t figure out exactly what does it and why, it could be from one of the theme’s plugins, but it could also be from WordPress. What I would recommend is to install a plugin such as Query Monitor – https://wordpress.org/plugins/query-monitor/ using this plugin it can be found more details about those queries.
Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.