Title: Flush doesn&#8217;t work within wp-admin (timeout?)
Last modified: November 10, 2019

---

# Flush doesn’t work within wp-admin (timeout?)

 *  Resolved [Hubert Nguyen](https://wordpress.org/support/users/hubertnguyen/)
 * (@hubertnguyen)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/)
 * Hello, this plugin used to have (timeout?) issues with Redis cache flush on my
   website, but usually, after a couple of tries, it would work.
 * From the latest update (v5.0.2), the plugin quickly answers “Object cache could
   not be flushed.” with little more information.
 * I thought it was a timeout due to the cache size (~1GB, not big), but even after
   flushing the cache manually and reducing it to ~100MB, I’m still having this 
   issue. Is there a log file that I could look at to see what the problem is?
 * I currently have to flush the cache from the Redis command-line each time. Other
   than that, everything else seems to work. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12116441)
 * Can you post your diagnostics?
 *  [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12119036)
 * Not sure if it’s related but i started receiving the same error when i enabled
   
   define(‘WP_CACHE_KEY_SALT’, ‘www.site.com’); define(‘WP_REDIS_SELECTIVE_FLUSH’,
   true); Flushing works fine without these
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12119145)
 * If you don’t need selective flushing, I highly recommend not using it.
 *  Thread Starter [Hubert Nguyen](https://wordpress.org/support/users/hubertnguyen/)
 * (@hubertnguyen)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12119152)
 * Till, which diagnostics?
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12123163)
 * You’ll find them under Settings – Redis and then at the bottom of the server 
   list.
 *  Thread Starter [Hubert Nguyen](https://wordpress.org/support/users/hubertnguyen/)
 * (@hubertnguyen)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12123478)
 * Got it! I’ve removed the IP and some site-specific info like the SALT
 * Status: Connected
    Client: PhpRedis (v5.0.2) Drop-in: Valid Ping: 1 Redis Extension:
   5.0.2 Predis Client: 1.1.1 PHP Version: 7.2.21-1+0~20190807.25+debian10~1.gbp935ebf
   Multisite: No Global Prefix: “wp_” Blog Prefix: “wp_” WP_REDIS_HOST: “—-REMOVED—”
   WP_REDIS_PORT: —-REMOVED— WP_CACHE_KEY_SALT: “—-REMOVED—” WP_REDIS_PASSWORD: “*************************************”
   Global Groups: { “0”: “blog-details”, “1”: “blog-id-cache”, “2”: “blog-lookup”,“
   3”: “global-posts”, “4”: “networks”, “5”: “rss”, “6”: “sites”, “7”: “site-details”,“
   8”: “site-lookup”, “9”: “site-options”, “10”: “site-transient”, “11”: “users”,“
   12”: “useremail”, “13”: “userlogins”, “14”: “usermeta”, “15”: “user_meta”, “16”:“
   userslugs”, “33”: “blog_meta” } Ignored Groups: [ “counts”, “plugins” ] Unflushable
   Groups: [] Dropins: – advanced-cache.php v by – Redis Object Cache Drop-In v1.5.0
   by Till Krüss Plugins: – Akismet Anti-Spam v4.1.3 by Automattic (Active) – AMP
   v1.4.0 by AMP Project Contributors (Active) – CDN Enabler v1.0.9 by KeyCDN (Active)–
   Classic Editor v1.5 by WordPress Contributors (Active) – Custom Post Type UI 
   v1.7.1 by WebDevStudios (Active) – Disable REST API v1.4.3 by Dave McHale (Active)–
   Fastly v1.2.9 by (Active) – Heartbeat Control by WP Rocket v2.0 by WP Rocket (
   Active) – Hotfix v1.2 by Mark Jaquith (Inactive) – Jetpack by WordPress.com v7.9
   by Automattic (Active) – MonsterInsights – Dimensions Addon v1.3.0 by MonsterInsights
   Team (Active) – MonsterInsights – EU Compliance v1.1.0 by MonsterInsights Team(
   Inactive) – MonsterInsights Pro v7.10.0 by MonsterInsights (Active) – Post Type
   Switcher v3.2.0 by John James Jacoby (Active) – Query Monitor v3.4.0 by John 
   Blackbourn (Inactive) – Redis Object Cache v1.5.0 by Till Krüss (Active) – SEO
   Friendly Images v3.0.5 by Vladimir Prelovac (Active) – SEO Smart Links Professional
   v1.8.8 by Vladimir Prelovac (Active) – Term Management Tools v1.1.4 by scribu(
   Inactive) – User Role Editor v4.52 by Vladimir Garagulya (Inactive) – VaultPress
   v2.0.1 by Automattic (Active) – WP-Optimize – Clean, Compress, Cache v3.0.13 
   by David Anderson, Ruhani Rabin, Team Updraft (Inactive) – WP-PageNavi v2.93.1
   by Lester ‘GaMerZ’ Chan (Inactive) – WP Minify v1.2.0 by Thaya Kareeson (Active)–
   WP Super Cache v1.7.0 by Automattic (Inactive)
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12123513)
 * That’s strange. Can you run “wp cache flush” via WP CLI and see if that works?
 * How large is your Redis instance?
 *  Thread Starter [Hubert Nguyen](https://wordpress.org/support/users/hubertnguyen/)
 * (@hubertnguyen)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12123567)
 * I don’t have WP-CLI access (managed LAMP) but my Redis is 1GB big.
 * Even from the redis console, a 1GB cache clear can be a little long (~10-15 sec?)
   but it is near instant for 100MB.
 * Did you change how you handle timeouts in the new version?
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12124971)
 * Aha, this is really good to know.
 * Yes, the timeouts have changed. For now, I’d suggest setting `WP_REDIS_TIMEOUT`
   and `WP_REDIS_READ_TIMEOUT` to `0` for infinite.
 * [https://github.com/tillkruss/redis-cache#connection-parameters](https://github.com/tillkruss/redis-cache#connection-parameters)
 *  Thread Starter [Hubert Nguyen](https://wordpress.org/support/users/hubertnguyen/)
 * (@hubertnguyen)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12124984)
 * I thought so. I’ll try the above, looks like it should work.
    Maybe there’s a
   way to make it async to avoid issues with load-balancers timing out etc. But 
   for now, it should work.
 * I appreciate the fast replies Till.
    Cheers,
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12125347)
 * Good, I’m glad it’s working.
 * FLUSHDB is actually an atomic/blocking command, Redis won’t do anything until
   the flush is finished.
 * There is a FLUSHDB ASYNC command, which is supported and extensively tested by
   the [business edition](https://wprediscache.com).
 *  [Millionleaves](https://wordpress.org/support/users/millionleaves/)
 * (@millionleaves)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12205755)
 * I was having this issue on several sites out of many that are all configured 
   in more-or-less the same way. Disabling WP_REDIS_SELECTIVE_FLUSH solved the problem,
   but I need that enabled.
 * However, I then tried changing the value of WP_CACHE_KEY_SALT for a couple of
   sites and the problem was fixed.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Flush doesn’t work within wp-admin (timeout?)’ is closed to new replies.

 * ![](https://ps.w.org/redis-cache/assets/icon-256x256.gif?rev=2568513)
 * [Redis Object Cache](https://wordpress.org/plugins/redis-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/redis-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/redis-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redis-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redis-cache/reviews/)

## Tags

 * [redis](https://wordpress.org/support/topic-tag/redis/)

 * 12 replies
 * 3 participants
 * Last reply from: [Millionleaves](https://wordpress.org/support/users/millionleaves/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/flush-doesnt-work-within-wp-admin-timeout/#post-12205755)
 * Status: resolved