A 504 error means that your server is unable to provide a timely response. Do you have your server configuration available?
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 6 years, 8 months ago by
epagebrad.
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.
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.
The process timeout is set to 60 seconds for max timeout, to answer the initial question.
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.
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…
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.
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?
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.
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.
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.
epagebrad,
I haven’t heard back so I’m going to close this request for now.