Redis response time spikes when WC-API calls running
-
Hi there,
Really like the plugin you’ve built, it speeds up our admin and frontend pages for logged in users (and other areas where page caching isn’t possible) tremendously so we really want to keep it if possible.
However, I am a bit stuck on an issue and wonder if you can help at all.
We run a WooCommerce shop with about 35,000 SKUs and we are integrated with our inventory management system which routinely triggers inventory syncs, these are basically just WC-API calls like the below:
endpoint: /wc-api/v3/products/54122
payload: {“product”:{“managing_stock”:true,”stock_quantity”:271}}
There can be several thousand of these calls every day. I’ve been monitoring the metrics screen when these syncs are running and every time, the response times spike like crazy. Going from 50ms to sometimes 10,000 ms and above.
As well as this, page load speed on the frontend slows tremendously from 1-2s to 10-15 seconds or sometimes higher.Once the sync finishes and API calls stop, everything returns back to normal until the next one.
When I disable Redis Object Cache, while I can still see the API calls are using up a lot of server resources, the frontend is barely affected and pages load for customers pretty much as fast as they usually do.I understand that the root issue isn’t your plugin but what’s going on when the API calls are triggered, but I just can’t wrap my head around why the frontend is so badly affected when Redis Object Cache is active. Any ideas would be greatly appreciated as I’ve been pulling my hair out for over a week trying to resolve this.
Here’s my diagnostics screen:Status: Connected Client: PhpRedis (v5.3.7) Drop-in: Valid Disabled: No Ping: 1 Errors: [] PhpRedis: 5.3.7 Relay: Not loaded Predis: 2.1.2 Credis: Not loaded PHP Version: 8.0.30 Plugin Version: 2.4.4 Redis Version: 3.2.12 Multisite: No Metrics: Enabled Metrics recorded: 2572 Filesystem: Working Global Prefix: “wp347_” Blog Prefix: “wp347_” WP_REDIS_TIMEOUT: 5 WP_REDIS_READ_TIMEOUT: 5 WP_REDIS_RETRY_INTERVAL: 50 WP_REDIS_PLUGIN_PATH: “/home/username/public_html/wp-content/plugins/redis-cache” Global Groups: [ “blog-details”, “blog-id-cache”, “blog-lookup”, “global-posts”, “networks”, “rss”, “sites”, “site-details”, “site-lookup”, “site-options”, “site-transient”, “users”, “useremail”, “userlogins”, “usermeta”, “user_meta”, “userslugs”, “redis-cache”, “blog_meta”, “network-queries”, “site-queries”, “user-queries”, “woo_variation_swatches” ] Ignored Groups: [ “counts”, “plugins”, “themes”, “theme_json”, “wordfence”, “wordfence-ls” ] Unflushable Groups: [] Groups Types: { “blog-details”: “global”, “blog-id-cache”: “global”, “blog-lookup”: “global”, “global-posts”: “global”, “networks”: “global”, “rss”: “global”, “sites”: “global”, “site-details”: “global”, “site-lookup”: “global”, “site-options”: “global”, “site-transient”: “global”, “users”: “global”, “useremail”: “global”, “userlogins”: “global”, “usermeta”: “global”, “user_meta”: “global”, “userslugs”: “global”, “redis-cache”: “global”, “counts”: “ignored”, “plugins”: “ignored”, “themes”: “ignored”, “blog_meta”: “global”, “network-queries”: “global”, “site-queries”: “global”, “user-queries”: “global”, “theme_json”: “ignored”, “wordfence”: “ignored”, “wordfence-ls”: “ignored”, “woo_variation_swatches”: “global” } Drop-ins: [ “advanced-cache.php v by “, “maintenance.php v by “, “Redis Object Cache Drop-In v2.4.4 by Till Krüss” ]
Thanks in advance
- The topic ‘Redis response time spikes when WC-API calls running’ is closed to new replies.