• Resolved sharondexter

    (@sharondexter)


    Hello, I received notice by the server host, WPEngine, that the plugin was creating 504 errors on the server due to too many uncached requests. I followed the Performance recommendations for installing an object cacheing plugin and adding the code to the wp-config.php file. However, there are still on average 2000 uncached hits a day.

    Besides removing the plugin, which seems to break the theme due to the way the developer built the site (custom theme), are there any other suggestions on how to reduce the number of requests? WPEngine will be blocking the requests soon if I don’t find a way to resolve this.

    Thanks
    Sharon

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Sharon,

    I received notice by the server host, WPEngine, that the plugin was creating 504 errors on the server due to too many uncached requests.

    This is a bit to vague. Could you please tell me which requests?

    I followed the Performance recommendations for installing an object cacheing plugin and adding the code to the wp-config.php file.

    Did you check if your object caching plugin is actually working? (WPEngine should be able to help you verify this.)

    Also, please go to Settings > WordPress Popular Posts and click on Debug, take a screenshot and upload it somewhere so I can take a look at your configuration.

    Thread Starter sharondexter

    (@sharondexter)

    Thanks for the quick reply.

    Here is what WPEngine supplied regarding the request – there are approx 1800-2000 a day (our blog is a high traffic blog) – POST /wp-json/wordpress-popular-posts/v1/popular-posts. A full request, (minus the IP and date) would be: “POST /wp-json/wordpress-popular-posts/v1/popular-posts HTTP/1.0” 201 55 “https://greenbookblog.org/market-research-leaders/the-art-of-storytelling-resources-for-research-storytellers/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36”

    I’ll confirm w/WPEngine regarding the caching.

    Here is a link to the screenshot requested: https://drive.google.com/file/d/1G1QpDbDw7rtj0jLNQNLU2FrsTOYhOW-H/view?usp=sharing

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks Sharon.

    Here is what WPEngine supplied regarding the request – there are approx 1800-2000 a day (our blog is a high traffic blog) – POST /wp-json/wordpress-popular-posts/v1/popular-posts.

    That doesn’t sound like “too many requests” to me. It seems your posts are getting around 1800-2000 visits per day in average. That’s what those requests are: WordPress Popular Posts keeping track of your posts’ views.

    Also, these are POST requests which shouldn’t be cached (and I’m not sure they can be cached given the fact that POST requests are mainly requests to create/update resources on your server.)

    Why is WPEngine saying that 2000 requests/day is “too many”?

    Here is a link to the screenshot requested (..)

    I checked the screenshot and noticed that there’s no persistent object caching plugin active among your active plugins list (at least none of the names I read sounded like one.)

    Additionally, I noticed that you’re also using Relevanssi on your site. I have never used that plugin before but what I’ve read about it (and even on their support forums) is that Relevanssi can cause performance issues under certain circumstances if not configured properly (50x errors among them). Have you checked this yet?

    Thread Starter sharondexter

    (@sharondexter)

    Hello,

    Thanks again for the quick response. I’m not a developer so feel a little out of my element here and am trying to find a solution to this as reported by our host (WPEngine). I understand your response regarding the posts. To provide a little more info, this is exactly what WPEngine had supplied to me:

    I am reaching out in regards to your greenbookgbb site. After receiving a few complaints about 504 errors on a couple of sites that share a server with yours, we began to investigate and it seems that a plugin on your site is the root of the errors. I am unsure if you are aware of all of the 504s that are taking place on your site, but upon shifting through your logs we have traced it back to your wordpress-popular-posts plugin.

    You can see in this short list, out of the top hits to our apache server on your site, the /wp-json/wordpress-popular-posts/v1/popular-posts/ request, is the largest by a great number:

    3011 /wp-json/wordpress-popular-posts/v1/popular-posts/
    675 /
    515 /feed/
    257 /wp-comments-post.php?wpe-comment-post=greenbookgbb
    This said, it is both asked and recommended that you find a way to either reduce these requests or find an alternative plugin in order to eliminate these 504 errors.

    If you are unable to do this or choose not to, we may be required to block the request and proceed to eliminate the issue ourselves in order to resolve the issue.

    I did check w/WPEngine regarding the persistent object caching and they have an option for this through their Dashboard that was applied to the site vs. a plugin.

    I’ll look into Relevanssi. Thanks for that info. I’ll also pass this information along to WPEngine Support. As I mentioned before, I don’t want to remove the Popular Posts plugin. I believe this works well for our site and removing breaks the template so leaving it as is would be the best alternative.

    Sharon

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks again for the quick response. I’m not a developer so feel a little out of my element here and am trying to find a solution to this as reported by our host (WPEngine)

    Don’t worry about it. My response from earlier might have been a bit too technical. My point is: having that many requests doesn’t necessarily mean that the issue is being caused by WPP. It just happens to be the plugin that makes the most requests on your site (and for good reasons too.)

    WPEngine should be able to do a more exhaustive analysis of your site to be able to pinpoint the reason why these timeout errors (504) are happening. I’m not saying that WPP is not to blame here (nor that it is), what I’m saying is that blaming the plugin based on number of requests alone seems unfair. There are other things that should be checked as well (eg. Is WPP putting too much stress on the database server? Is another plugin? What are the scripts that are consuming most bandwith/RAM on your site? Is WPE 100% sure that it is your site what’s causing these issues? Etc.)

    I did check w/WPEngine regarding the persistent object caching and they have an option for this through their Dashboard that was applied to the site vs. a plugin.

    I thought that that was the case after posting my previous comment but thanks for confirming. Let’s assume that object caching is working as intended then.

    I’ll look into Relevanssi. Thanks for that info. I’ll also pass this information along to WPEngine Support. As I mentioned before, I don’t want to remove the Popular Posts plugin. I believe this works well for our site and removing breaks the template so leaving it as is would be the best alternative.

    One quick way to find out if Relevanssi is causing performance issues or not is disabling it for a few days (you don’t need to uninstall it, deactivating it should probably be enough.) As a side effect, your search form will not return results as accurate as when Relevanssi was enabled but this will help you determine whether that plugin is causing performance issues on your site (you’ll have to monitor your site’s logs to tell whether these 504 errors are still happening or not.)

    Thread Starter sharondexter

    (@sharondexter)

    Hello,

    I’ve updated WPEngine support with the information you had supplied yesterday and they are sending this to their Senior Team for their review and input.

    The information you supplied makes perfect sense so it does seem that there is more investigation on their end that needs to take place.

    Thanks for the quick responses and your input. I’ll let you know of the response from the WPEngine Senior Team if there are any findings that affect WPP.

    Thanks again,
    Sharon

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks for the update, Sharon. Very nice of you.

    Please let me know if there’s anything I can do to help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Creating 504 Errors, Too Many Requests, Caching not working’ is closed to new replies.