• Resolved bloggy2013

    (@bloggy2013)


    I searched and searched and all I can find are people arguing, mainly some people rejecting that WooCommerce might be to blame for slow sluggish server/site response. Fine, I don’t care what is causing it, I just need to figure out how to fix it.

    I very badly need some help with this because we’ve already started spending a lot of money on related things including custom programming.

    We purchased WooCommerce a few days ago, having run our web site for nearly a year with out it. CPU loads were always insignificant no matter how many people were hitting the site, maybe 2%, 5% on average.

    After installing WooCommerce, the site has become super slow, multiple CPUs showing loads of some 30% 40% while simply refreshing pages.

    We also have W3 Total Cache installed on this server which has always done the job, until now.

    To try and figure out what was going on, we copied a backup that we took just before installing WooCommerce onto the same server and compared side by side and confirmed that there is no load at all without WooCommerce and huge loads with.

    The site is not a heavy traffic one so the server is pretty much idle most of the time. It is a Centos7, 32GB, Dual quad 3.0 CPU server which has plenty of horsepower. But again, we compared both with and without on the same server which pretty much shows the problem is WooCommerce.

    Does anyone know how I could fix this, other than using external CDN’s which still doesn’t solve the server issue. If WooCommerce is so heavy on load, we need to know what our options are asap.

    Thanks very much.

    UPDATE:

    I have been doing more tests and what is interesting is that the site which never had WooCommerce installed on it causes no load.

    However, turning off all of the WooCommerce plugins, Affiliate and other things we purchased don’t make any difference, even after clearing caching etc.

    The backup that never had WooCommerce installed on it remains very fast without much CPU load.

    This alone is a little odd.

    https://wordpress.org/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 47 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    We also have W3 Total Cache installed on this server which has always done the job, until now.

    Static caching cannot help with dynamic pages, such as cart and checkout. These cannot be cached like other content.

    One possible cause of extra load; geolocation. Disable the geolocation for ‘customer default location’ setting.

    Thread Starter bloggy2013

    (@bloggy2013)

    Hi,

    I changed it to No Address. No difference.
    I am not trying to cache dynamic pages, I only mentioned that I also have W3 Total Cache installed which doesn’t make any difference, for any static pages at least.

    Also, the cart has never been used yet, we just got it so there would not be anything to cache WooCommerce wise either way.

    What should I look at next.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Install https://en-gb.wordpress.org/plugins/query-monitor/ and see if there are slow queries, errors, or high memory usage.

    Can I ask who you’re hosting with?

    And post your system status report here.

    Thread Starter bloggy2013

    (@bloggy2013)

    We own our own servers, nothing else live (public) on it but one wordpress site.

    There aren’t any overly high mysql queries. We are aware of two problems but they are unrelated.

    I went ahead and installed the plugin you’d like me to. I don’t see anything unusual.

    Page generation time
    3.2747
    1.1% of 300s limit

    Peak memory usage
    69,422 kB
    26.5% of 262,144 kB limit

    Database query time
    0.0174

    Database queries
    SELECT: 66

    Thread Starter bloggy2013

    (@bloggy2013)

    Simply refreshing, no one else doing anything on the site, leads to high CPU loads. This does not happen on the backup copy of the same site before WooCommerce being installed running on the same server.

    Also, we watch Mysql and other services regularly because we need to debug our code sometimes, to remove anything that might be causing a performance issue.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    If query monitor shows nothing unusual I’m not sure what to recommend. WC does nothing behind the scenes which could cause that – the only issue I’m aware of is with geolocation (the fallbacks are external calls to other sites which can be resource intensive).

    Can you post the report I requested?

    Thread Starter bloggy2013

    (@bloggy2013)

    Well, maybe you’ve found a new situation because we’ve bought all of this and it’s bogging our server down.

    There is no MySql issue either, this is strictly the httpd processes only.

    I’ve explained it and tested it, it is clearly WooCommerce causing this and if not, then one heck of a coincidence 🙂

    Thread Starter bloggy2013

    (@bloggy2013)

    Have you read the entire post I originally did above? There are two instances of the exact same web site. One is a backup and the other had WooCommerce installed on it.

    Going between the two sites clearly shows CPU load on multiple CPU’s. Even after disabling everything we purchased, this continues to happen but only on the instance that has WooCommerce installed on it.

    Something related to WooCommerce is obviously the cause here. Perhaps there is something you are not aware of, I don’t know. All I know is that I need help to figure this out otherwise, everything I have purchased is of no value.

    So, what ever you need, I am willing to help to find this problem.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Why won’t you post the report? https://wordpress.org/support/topic/before-posting-gather-the-following-details?replies=1 I’d like to see what extensions you’re running along side (you mentioned you ‘purchased’ things – WC core is free).

    I don’t have server access so all I can only tell you general things, like the fact that static caching won’t work on cart/checkout etc screens. Obviously that will increase load vs static cached content you’d have on a regular blog.

    Server error logs should also be checked – ensure each page load is not throwing errors. You mention 2 unrelated issues, but if it’s a slow query or error, yes it can be related..

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Also of note, I remember you posted this a while back https://wordpress.org/support/topic/direct-readwrite-to-database?replies=7 Did you ever do anything with that?

    I need to point out, any custom coding, as well as extensions, may only run when WooCommerce is activated. Thats why often we hear people say “WooCommerce is obviously the cause here” but in reality its some code using woocommerce as a dependency 🙂

    Thread Starter bloggy2013

    (@bloggy2013)

    I didn’t do the purchasing but they bought a bunch of extensions of what ever they are called, Subscription, Affiliation, stuff like that :).

    Yes, we also watch logs live and there are no errors.

    The only WooCommerce related error was yesterday when I disabled all of the related plugins. (below)

    The errors that we know of were before installing WooCommerce and are related to a Yii app on this server.

    [Fri Apr 29 15:36:24.511296 2016] [:error] [pid 23052] [client xx.xx.xx.xx:62958] WordPress database error Duplicate key name ‘location_type_code’ for query
    ALTER TABLE wp_woocommerce_tax_rate_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by activate_plugins, activate_plugin, do
    _action(‘activate_woocommerce/woocommerce.php’), call_user_func_array, WC_Install::install, WC_Install::create_tables, dbDelta, W3_Db->query, W3_DbCache->que
    ry, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query, referer: https://www.domain.com/wp-admin/plugins.php?plugin_statu
    s=all&paged=1&s

    Sorry I didn’t include this before.

    ### WordPress Environment ###

    Home URL: https://www.domain.com (changed for privacy)
    Site URL: https://www.domain.com
    WC Version: 2.5.5
    Log Directory Writable: ✔
    WP Version: 4.5.1
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_US

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 5.4.16
    PHP Post Max Size: 20 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.5.47
    Max Upload Size: 10 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    WCS_DEBUG: ✔

    No
    Subscriptions Mode: ✔

    Live

    ### Database ###

    WC Database Version: 2.5.5
    :
    woocommerce_sessions: ✔
    woocommerce_api_keys: ✔
    woocommerce_attribute_taxonomies: ✔
    woocommerce_termmeta: ✔
    woocommerce_downloadable_product_permissions: ✔
    woocommerce_order_items: ✔
    woocommerce_order_itemmeta: ✔
    woocommerce_tax_rates: ✔
    woocommerce_tax_rate_locations: ✔

    ### Active Plugins (19) ###

    Query Monitor: by John Blackbourn – 2.10.0
    404page – your smart custom 404 error page: by smartware.cc
    Peter’s Plugins – 2.1

    AffiliateWP: by Pippin Williamson and Andrew Munro – 1.7.18
    Akismet: by Automattic – 3.1.10
    Duplicate Post: by Enrico Battocchi – 2.6
    Elegant Themes Updater: by Elegant Themes – 1.1
    Jetpack by WordPress.com: by Automattic – 4.0.2
    Monarch Plugin: by Elegant Themes – 1.2.8
    NextScripts: SNAP Pro Upgrade Helper: by Next Scripts – 1.3.4
    Quick Page/Post Redirect Plugin: by anadnet – 5.1.8
    NextScripts: Social Networks Auto-Poster: by Next Scripts – 3.5.5
    TinyMCE Advanced: by Andrew Ozz – 4.3.8
    W3 Total Cache: by Frederick Townes – 0.9.4.1
    WooCommerce PayPal Powered by Braintree Gateway: by WooThemes – 1.2.0
    WooCommerce Min/Max Quantities: by WooThemes – 2.3.13
    WooCommerce Subscriptions: by Prospress Inc. – 2.0.13
    WooCommerce: by WooThemes – 2.5.5
    WooThemes Helper: by WooThemes – 1.6.2
    Yoast SEO: by Team Yoast – 3.2.4

    ### Settings ###

    Force SSL: ✔
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2

    ### API ###

    API Enabled: ✔
    API Version: 3.1.0

    ### WC Pages ###

    Shop Base: #3720 – /shop/
    Cart: #3721 – /cart/
    Checkout: #3722 – /checkout/
    My Account: #3723 – /my-account/

    ### Taxonomies ###

    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    subscription (subscription)
    variable (variable)
    variable subscription (variable-subscription)

    ### Theme ###

    Name: Divi
    Version: 2.7.3
    Author URL: http://www.elegantthemes.com
    Child Theme: ✕ – If you’re modifying WooCommerce on a parent theme you didn’t build personally
    then we recommend using a child theme. See: How to create a child theme

    WooCommerce Support: ✔

    ### Templates ###

    Overrides: –
    `

    Thread Starter bloggy2013

    (@bloggy2013)

    >I need to point out, any custom coding, as well as extensions, may only >run when WooCommerce is activated.

    Yes, I agree but no, there is nothing else installed on this. There is no customization other than the normal changes needed to make it our own store :).

    Yes, I did post about reading/writing but I have some programmers working on that now and nothing is installed on this server yet.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    That error can be ignored – it’s just the indexes on tables.

    For comparisons sake:

    Page generation time
    3.2747
    1.1% of 300s limit

    Peak memory usage
    69,422 kB
    26.5% of 262,144 kB limit

    Database query time
    0.0174

    Database queries
    SELECT: 66

    This is my result on a clean install with WC on the shop page http://glui.me/?i=oo81tgj8i17a8ha/2016-04-30_at_23.44.png/

    Significantly less memory usage for a start.

    PHP Version: 5.4.16

    Newer versions of PHP perform better. Worth updating to 5.6 perhaps?

    Force SSL

    Your site is already HTTPS, so you don’t need to force ssl.

    Name: Divi

    Tested without this theme active?

    W3 Total Cache

    You may want to disable this on your backup and this site for more accurate comparison. If this is misconfigured it could cause issues and more CPU usage as it writes to disk.

    Thread Starter bloggy2013

    (@bloggy2013)

    Now, as I mentioned above, I also disabled all of the plugins on the WooCommerce copy of the site and it remained slow. Only the backup version before installing all of the WooCommerce stuff is still as fast as it was before.

    Both are on the same server because we could not figure out why this was happening.

    Thread Starter bloggy2013

    (@bloggy2013)

    Yes, agreed, we will probably upgrade php in the near future but at this time, it would add another complexity so for now, while trying to find this problem, we’ll just leave that.

    Yes, tested with and without W3, no difference. The backup site is always very fast while the WooCommerce one is causing multiple high CPU loads.

    No, have not tested by changing the theme and would prefer not to because that is the theme we are going to use. The site runs very fast without WooCommerce using this theme.

    I doubt there is a problem with DIVI however.
    http://www.elegantthemes.com/gallery/divi/documentation/ecommerce/

    “Divi has been designed to be WooCommerce compatible. To integrate WooCommerce you will need to install the latest version of WooCommerce.”

Viewing 15 replies - 1 through 15 (of 47 total)

The topic ‘WooCommerce Causing Heavy Server Loads’ is closed to new replies.