-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncached SQL queries on every page load. #17005
Comments
@spacedmonkey could you elaborate what's wrong in this situation? It's not new behavior (been there since the indexables release in 14.0). |
@Djennez I just noticed this. I would say these queries should be cached for performance reasons. The biggest issue, is if multiple queries. On one page request, I was getting 14 queries. On my homepage, I was getting 128 queries. That is a lot. Enough to take a database server down a peak request times. |
@spacedmonkey can you find why all those posts are individually retrieved from the database on your frontpage? From what I can see, this is behavior that is not present on a default WordPress installation. Also, can you enlighten me on how / what needs to be cached if every one of these queries is retrieving different data, I think I am missing that context? |
Is there any more information available about this issue? As stated before, we can't reproduce the large amount of individual indexable calls on empty WordPress installations, so we expect some sort of conflict. The issue we see here is just the amount of calls, not the fact they aren't cached. Because they're rather fast. |
I'm going to close this due to inactivity without it having sufficient information. If additional information is provided, we'll look into reopening the issue. |
@Djennez Jonny Harris (@spacedmonkey, the OP of this issue) was asking about it, so I've reopened it for him. |
Thank you for re-opening. Looking into this issue again, while reviewing new relic logs. I see 3 uncaching MySQL on my pages. See a screenshot from query monitor from my about us page, spacedmonkey.com/about. These queries are coming from this method. The query seem pretty simple, querying WP SEO's custom table, by object id and type. So the query runs quickly. But simple query like this should be cached. Query by id and type, makes a cache key generation simple.
Cache invalidation should be simple, only updating / deleting key when that object is updated. Otherwise, that cache should be valid forever. I know it is simple query, but for sites under heavily load or under a DDOS attack, 3 queries a page should take the database server and website down. Will to support on this ticket and provide as much information, testing and code review as needed. |
Still awaiting a response on this one. |
@schlessera Is there any chance someone could look into this issue? |
Please give us a description of what happened.
Using the plugin query monitor, I am seeing raw uncached sql queries run on every page load. See screenshots.
Please describe what you expected to happen and why.
After second page load, these queries should be cached.
How can we reproduce this behavior?
Technical info
Used versions
The text was updated successfully, but these errors were encountered: