• Resolved epagebrad

    (@epagebrad)


    I am seeing occasional 504 errors on my site, and they all say

    /wp-admin/admin-ajax.php?action=force_refresh_get_version&post_id=2712:1 Failed to load resource: the server responded with a status of 504 ()
    force-refresh.built.min.js:1 ForceReload - AJAX error. Error below:
    error @ force-refresh.built.min.js:1

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter epagebrad

    (@epagebrad)

    Plugin Author jordanleven

    (@jordanleven)

    A 504 error means that your server is unable to provide a timely response. Do you have your server configuration available?

    Thread Starter epagebrad

    (@epagebrad)

    What would you need? I can get it or ask WPengine to provide.

    They were the ones that thought that thought the plugin was making too many requests and might be causing the problems.

    • This reply was modified 5 years, 6 months ago by epagebrad.
    Plugin Author jordanleven

    (@jordanleven)

    I’d just need the process timeout in seconds they use.

    This plugin makes requests for each user based on your value you set for the interval. If you set it to check every thirty seconds and there are 500 users on your page, it’ll send 2,000 requests per two minutes. If WP Engine can’t handle that load, you may need to update the request interval.

    Thread Starter epagebrad

    (@epagebrad)

    I was at 30 second refresh. I moved it to 120 and will have to see if that helps. I can only tell when the simultaneous user count gets to around 200, so that will not be until Tuesday next week. If this goes quiet, things are good.

    Thread Starter epagebrad

    (@epagebrad)

    The process timeout is set to 60 seconds for max timeout, to answer the initial question.

    Plugin Author jordanleven

    (@jordanleven)

    Gotcha. In this case, it might be that WPEngine’s server is unable to handle the number of requests being sent to it. It’s expected behavior that the plugin sends one request per user per the refresh interval. However, if you’re experiencing a large amount of traffic and the server is unable to handle sending back those requests, you will see timeouts like this in the server log.

    Thread Starter epagebrad

    (@epagebrad)

    If this becomes a problem, can I edit the code to increase the interval past 120 seconds? If I can live with a longer interval, then this might be a way for me to deal with it. I know they will want to sell me a more powerful server as a solution…

    Plugin Author jordanleven

    (@jordanleven)

    Currently, adding custom refresh intervals is not a supported feature. However, I can add this to the backlog if you think it’d be useful in your case.

    Thread Starter epagebrad

    (@epagebrad)

    If I wanted to go into functions.php and edit my own version to add:
    “preset_value_force_refresh_refresh_interval_150” => $preset_option_refresh_interval === ‘150’ ? “selected” : null

    Or replace 30 with 150 (or whatever number I needed), would that work?

    Plugin Author jordanleven

    (@jordanleven)

    epagebrad,

    Typically, modifying the plugin like that is not a best practice since your changes will be overridden next time the plugin updates. Feel free to modify the plugin if you wish, but I’d be unable to provide support if it were to fail.

    Thread Starter epagebrad

    (@epagebrad)

    Got it. This would only be if I was in the middle of things and started seeing errors and needed a quick fix. I will see if moving from 30 to 120 fixes everything Tuesday morning when I will have the 200 or so users all hitting the site for 45 minutes.

    Plugin Author jordanleven

    (@jordanleven)

    Sounds good! But generally, yes, those interval values are localized from the PHP side to the JS side, so any value you change there would propagate to the JS.

    Plugin Author jordanleven

    (@jordanleven)

    epagebrad,

    I haven’t heard back so I’m going to close this request for now.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Plugin and 504 errors’ is closed to new replies.