• Hey there,

    I am facing serious issues with my WordPress site that gets around 600 visitors online at peak times. From tomorrow night it was going down over and over.

    The site is hosted on GoDaddy Value Dedicated server with 8 GB ram and 4 core CPU. It is also using cloudfornt and CloudFlare.

    The plugins I am using are-

    W3 total cache
    Yoast SEO
    Visual Composer
    Akismet
    All In One WP Security
    Easy Social Share Buttons
    and a few other small plugins that I don’t think could cause a problem.

    These are the errors it was displaying in error log-

    1) PHP Warning: Error while sending QUERY packet. PID=2190 in /home/abc/public_html/wp-includes/wp-db.php on line 1877

    2) WordPress database error Query execution was interrupted for query SELECT p.ID

    3) WordPress database error Query execution was interrupted for query SELECT SQL_CALC_FOUND_ROWS

    I noticed in the log that the first error was coming since 5 months, but there was no issue with the website. But the last two errors started coming since tomorrow night, and that’s when the site started to go down.

    I also noticed that this error – WordPress database error Query execution was interrupted for query SELECT appeared at the same time at which I published a post.

    One more issue I am facing since a month is that when I click on publish to publish a new post, it keeps loading for a few seconds, and then WordPress displays 404 error. That’s the same thing happened tomorrow night

    I checked in WHM at the time of the error, the Server Load was 95.134 (4 CPUs) but memory used was quite low around 3%.

    So, today morning I disabled the W3TC from Cpanel to check if the issue is due to it. And to my surprise, everything when fine, the site is loading fast and the Server Load when down to 0.774414 (4 CPUs).

    I checked in Pingdom for the speed without any caching plugin and CDN, and the speed was around 4.2 seconds for a post with 8 to 10 images. It used to be around 3.2-3.5 for the same post.

    I don’t think there is a major impact on the speed of site after removing W3TC and CDN.

    Is this error due to a misconfiguration in W3TC settings (I was not using database caching)?

    Is it due to compatibility issues?

    Or can I be due to MySQL or misconfiguration I server?

    I was wondering what to do now? Should I try deleting the plugin completely and reinstall and reconfigure it from scratch or should I switch to another plugin?

Viewing 14 replies - 1 through 14 (of 14 total)
  • > Is this error due to a misconfiguration in W3TC settings

    mhh, i seem an overload issue.

    > PHP Warning: Error while sending QUERY packet

    This can be caused by some factors, but it seem a MySQL configuration issue.

    1) MySQL have limitation for size of data of the single query, you can change your max_allowed_packet by using: SET GLOBAL max_allowed_packet=524288000;

    2) You may also have this error if variable wait_timeout is too low. If so, you may set it higher like that: SET GLOBAL wait_timeout 10

    i don’t think the problem is w3tc. Try to contact your hosting support.

    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    Thanks for the help. I checked the wait_timeout, and it was set to 28800. So I decreased it to 300. And set max_allowed_packet to 524288000 as you said.

    I also reenabled the W3TC and so far haven’t received any errors except this – Allowed memory size of 536870912 bytes exhausted (tried to allocate 6 bytes) in /home/abc/public_html/wp-includes/wp-db.php on line 1475, but that had been coming for many months.

    I tested the site in Pingdom and speed probably increased by 0.5 to 0.75 second.

    It seem some plugin make a huge query… you need to found the root of the problem.

    Try to disable only db cache on w3tc, maybe it help to reduce memory allocation, but decrease the performance.

    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    Yes. I already disabled the database cache a few days ago when – Error while sending QUERY packet error occurred.

    But some hours ago the errors appeared again. The site went up and down for around an hour. I checked the error log, and it had all the same errors again. The server load was around 80.

    I disabled the W3TC, and the server load came back to normal (0.7), and the site started to function correctly.

    I tested the speed in Pingdom, and the speed was under 3.5 seconds at the time when more than 500 visitors were online. That’s the same speed that I was getting with W3TC and CDN turned on.

    Just to be sure I checked the max_allowed_packet and wait_timeout and they were same as I set them.

    So why this issue is still persisting? The site getting for such a long time is seriously harming the reputation of my site.

    Is it due to a conflict between W3TC and another plugin?

    Is it possible that this issue will still be there if I switch to another plugin (I am thinking to switch to WP rocket)?

    Have you object caching enabled? What service you use for caching:disk, apcu, memcache? If you use disk for all caching module and you have a magnetic dusk maybe you have an overload on the disk reading, writing operation.

    Another tips to try: in the object cache page setting disable “Store transients in database”

    My 5 cents: 500 user inline is a lot of traffic, try to add another caching layer like cloudflare or varnish, and also i think you need a cdn.

    • This reply was modified 7 years, 4 months ago by nigro.simone.
    • This reply was modified 7 years, 4 months ago by nigro.simone.
    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    I had the object caching enabled, and it was set to disk caching.

    Yes, I know 500 visitors online are a lot (it even goes to 600-700 at peak hours), and that’s why I want to avoid experimenting.

    The site is using both CloudFlare and CDN. W3TC is disabled right now. I bought the WP rocket today and will test it on the site at non-peak hours.

    I will also try to test W3TC with the setting you recommended to see the speed difference between the plugins. One more question, Is there any free service to load test the site with 300-400 visitors? I would like to test the site under the same conditions as it used to be in peak hours to be sure that it will not go down again.

    @ssanchitsharma420

    > I had the object caching enabled, and it was set to disk caching.

    this is a bad idea… if you have mysql/apache/wordpress on the same disk, the disk io operation (read/write) became a huge bottleneck. The better way fo caching the object is use a memory module like apcu/memcache/redis.

    > Is there any free service to load test the site with 300-400 visitors?

    not free… you cold try https://www.loadui.org/ ha a trial version.

    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    The APCu isn’t installed on the server right now. But one of my other site with similar plugins and configurations faced the same issue and errors. The WordPress customizer was also not opening.

    I disabled all the plugins and found that it was due to the conflict between Yoast SEO and W3TC. The Yoast SEO is disabled on that site right now, and it is working well.

    But on that site (old site), we can’t go without Yoast SEO. I tried WP rocket and quite disappointed with it. I only reduced the speed (compared to without any caching plugin) by barely 0.5 seconds without CDN. The second most disappointing thing is that it only has CDN option for Maxcdn.

    which version of Yoast SEO,Visual Composr and W3TC are you using?

    • This reply was modified 7 years, 4 months ago by Prince_Dhaval.
    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    W3TC – Version 0.9.5.4

    Yoast – Version 4.7.1

    Visual Composer – Version 4.12.1

    I am using newspaper theme (from ThemeForest), and it seems like that the theme is also involved in this issue because when I switched to a default WordPress theme with both plugins activated and there was no issue.

    But I can’t switch the theme right now and one thing I noticed that all this started happening after I updated the theme, so I downgraded on both sites and decided to continue using both plugins (w3tc and yoast).

    So far on errors in the second site (the other site) but in that site with lots of visitors faced the downtime again with all the same errors.

    This new error also appeared for the first time – Cannot redeclare wp_get_server_protocol()

    I am just frustrated with the issue. I don’t want to stop using W3TC because there is no option for CDN in wp rocket. Can you please suggest any good plugin for CDN. I tried offload s3 lite, but it does not work for existing files.

    What should I do now?

    Why isn’t increasing the values in Mysql config is fixing these errors

    Error while sending QUERY packet. PID=18684
    WordPress database error Query execution was interrupted for query

    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    I enabled the APCu on other sites VPS (both sites are on different servers) and but there is no improvement in speed. Will do it on the dedicated servers today.

    Hello new version of yoast seo and w3tc can cause more load on server as well
    in yoast seo 4.6 introduces some new features of cornerstone articles
    and about w3tc upto 0.9.2 working fine. furthermore whatever the theme you used its parent theme or child theme. if parent then please create the child theme it helps whenever any update of themes comes it would not broke anything. please use the visual composer version 5.1.1. if you have backup of your theme then try to reset the new version and check if it helps. for error That means the function wp_get_server_protocol() has been declared twice, either in some plugin or theme.please check

    Thread Starter ssanchitsharma420

    (@ssanchitsharma420)

    I will downgrade the w3tc and yoast to the version you suggested and update the VC.

    After that error, I again disabled the W3TC. One thing I noticed (when W3TC is on) is that when the site is functioning properly and there are no errors than even the server load used to be around 2.1 (4cpu’s). After I disabled the W3TC, the server load went down to 0.5 and that too when there were 400 visitors online without any caching plugin and CDN.

    For now, I have switched back to WP Rocket and signed up for Maxcdn. I will try to compare the speed of WP rocket with Maxcdn vs W3TC with cloudfront. Than I will decide what to do next.

    I am also thinking to switch to a mobile first theme (because 80% of our visitors are from mobile).

    it seems error is concerning to w3tc
    w3tc works fine but except the latest verson
    even vc 5.1.1 was awesome with material js you can try for that
    but in 5.1.1 version there 4 elements are deprecated that can not be visible in element list

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Facing Serious Issues with W3TC. Please Help’ is closed to new replies.