• Resolved ericcool

    (@ericcool)


    HI,

    In my Debian server I installed W3 cache plugin on two websites (SiteA and SiteB).

    The w3 cache setting on both two websites I enabled are : Page cache , Minify and Object cache on Redis.
    The Redis setting I give different database ID:
    Redis Database ID: 1
    Redis Database ID: 2

    The wp-config.php file in the two sites I set different key by using following config:
    define(‘WP_CACHE_KEY_SALT’, md5( DB_NAME . $table_prefix . __FILE__ ) );

    The performance drops on SiteB when I click on “purge all caches” on SiteA but the SiteA performance becomes very fast.

    The same way when I click on “purge all caches” on SiteB, the SiteB performance is very fast but the siteA become slower.

    I thought it might be the problem of object cache key conflict on Redis but I’ve set different key and database id. What else could cause the problem ?

    Why the w3 cache plugin affects other website on the multi-site environment?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ericcool

    Thank you for your inquiry and I am happy to assist you with this.
    WP_CACHE_KEY_SALT is used in other plugins, not W3TC.
    Have you made any tests to back up your theory or is this just your experience on the website? Can you please share your website URLs?
    Are you using a single configuration for all websites in your multisite environment?
    Thanks!

    Thread Starter ericcool

    (@ericcool)

    Hi,

    The sites I’m testing are :
    https://mahathep.com.tw/
    https://homie.tw/

    Please have a look of the video.
    https://streamable.com/rm8b82

    I open two website tabs and testing for woocommerce order page.

    1. I click three times on order page in mahathep , the average waiting time in firefox shows 1.2 seconds.

    2. I click on homie website and purge all cache.

    3. Return to mahathep and click on order page, the waiting time in firefox increases to 2.62 seconds.

    4. I click “purge all cache” on mahathep and click order page again, the waiting time becomes 1:27s again. Please see video clip at 2:32.

    The folder structure in my debian is like:
    /var/www/mahathep.com.tw
    /var/www/homie.tw
    Each of them has individual wp-config.php file

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ericcool

    Just one more question, is this a Multisite on a VPS/dedicated server or two separate websites on a shared server?
    Thanks!

    Thread Starter ericcool

    (@ericcool)

    I misunderstand the definition of multisite

    Mine setting is two separate websites on a shared server.

    Each wordpress has its own wp-config.php and folder
    /var/www/mahathep.com.tw
    /var/www/homie.tw

    At the front I’m using an apache server and php-fpm module and Mariadb database in the shared server.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ericcool

    Well, I believe that this is your answer. The shared server is using the same resources for all websites so in your case once the cache is purged (depending on the settings enabled) the resource usage for the first website increase.
    The best option is to use VPS or dedicated servers for each website.
    Thanks!

    Thread Starter ericcool

    (@ericcool)

    I don’t understand why resource usage increases only for the first cache purged website.

    It sounds like w3 cache does not work best on the shared server.

    What if I upgrade to w3 cache pro , is pro version able to solve this problem??

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ericcool

    No, it will not solve your problem.
    The problem is with the Shared hosting and limited resources. It’s not that W3TC is not working well with shared hosting, it’s the common problem with any shared hosting environment: limited resources.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Loading slow on multi-site environment’ is closed to new replies.