Hi there,
Thanks for reaching out to us. We are sorry for your inconvenience. Could you record me reproducing your issue using a tool like this? https://www.useloom.com
Can you please temporarily deactivate our Swatches plugin and check if it happens without our plugin or not?
How many variations and products you are using on your archive page?
Server requests depend on product variations and quantity. If your archive/home page has 30 products and each product has 5 variations so 30*5 = 150 server requests.
In our latest version, we cache the data for 1 hour and if a visitor hit the URL it will hit your server once, then data will be cached and data will be served from the locale.
Please reduce the product number on the first load.
Basically, we suggest 15 products on the first load, then use infinite scroll to load more products.
Thank You
Too many Ajax requests causing high cpu
Dan Greenberg
Hi,
we are using “Variation Swatches for WooCommerce – Pro” and on the product and archive pages, it’s making a lot of ajax requests which are bringing down a pretty powerful VPS during bigger sales.
I see why this is needed, we do want to check the status and quantity of each variation swatch, while still serving a static cached version of the pages.
Can you help us figure out a way to cache(and bust on product id update or order?) those rest API requests so that at least they don’t run the whole WordPress and bring the server down?
We are using WP Rocket for caching, tried adding https://docs.wp-rocket.me/article/1523-enable-caching-for-wp-rest-api but it doesn’t seem to help, maybe because it’s a custom api endpoint. Are you aware of a way to help WP Rocket include your API endpoint in the Rest Api cache?
We tried https://wordpress.org/plugins/wp-rest-cache however the plugin is not working for some reason, not generating any caches and throwing php errors.
Thank you for your support!