WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] 'Database Caching' caching all my Page entires in one query... (8 posts)

  1. senator94
    Member
    Posted 4 years ago #

    I have a cache entry that is 625748 bytes and growing. I every time I add a new page(not a post) to my blog the "Database Caching" caches all the pages in the stored value.

    How do I prevent this from happening?

    How do I use the "ignored query stems" in "Database Caching Settings"?

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Posted 4 years ago #

    How do I prevent this from happening?

    I'm not sure I understand your statement here. Best to enable debug mode and evaluation what the caching engines are doing for the pages. Debug mode is enabled on the general settings tab and it's best either to logout or use another browser which does not have an active WP Admin session to review the debug data (in the page's source code).

    How do I use the "ignored query stems" in "Database Caching Settings"?

    You can enter any term from queries that never need to be cached; one per line, and they will never be cached. E.g. Gd Star Rating requires "wp_gdsr" be added to this field in order to work.

  3. senator94
    Member
    Posted 4 years ago #

    Found the query that is giving some problems.

    5 | 0.013 | enabled | Cached | SELECT * FROM wp_posts WHERE (post_type = 'page' AND post_status = 'publish') ORDER BY post_parent,menu_order ASC

    That query is growing every time I add a page.

    Is that a normal query?

  4. Frederick Townes
    Member
    Posted 4 years ago #

    At-a-glance, it looks ok. The response time looks ok there as well. I think I'm confused about the issue that you're having.

  5. senator94
    Member
    Posted 4 years ago #

    The size is the issue.

    625748 bytes and growing...once it hits 1mb memcached won't be able to cache it.

  6. Frederick Townes
    Member
    Posted 4 years ago #

    So you have confirmation that the same slab is being updated with a larger and larger data entry?

    BTW, if you don't have a multiple server configuration, you don't need memcached.

  7. senator94
    Member
    Posted 4 years ago #

    I moved my database cache over to APC. My page cache is spread across 6 memcached servers. I have thousands and thousands of pages and about 6000 pages that are active.

    I was trouble shooting, found it easier to view the size and content of the data entry in APC user cache. I have confirmation that the data entry is growing every time I add a page(not a post). I can actually see all the data of every page listed in order in APC user cache.

    This data entry is slowing down my server when I update.

  8. Frederick Townes
    Member
    Posted 4 years ago #

    Aha, now it's clear. I don't think that is a core WordPress query. With so many posts, each time one is added it will grow. The plugin or theme function executing this query is obviously not one that is good for production environments. You need to find the code causing that and optimize it. For APC the SHM size can be increased easily, for memcached you can recompile to increase slab size. In either case, I do not recommend it as there is no performance win there, that query is not productive. Also spreading out queries amongst too many memcached servers is not a performance win. 1 or 2 instances per cache type is already enough. Just make sure you use memcache. And if possible use APC instead as it will be faster in general.

    Anyway, this is not an issue related to W3TC, caching cannot improve all queries.

Topic Closed

This topic has been closed to new replies.

About this Topic