Support

Home Forums Event Espresso Premium API – Timeout Calls crashing admin on high traffic site

API – Timeout Calls crashing admin on high traffic site

Posted: July 24, 2018 at 9:31 am


reefbuilders

July 24, 2018 at 9:31 am

EE is crashing our admin backend, because API calls are timing out. Apparently the API server or validation is not receiving a response and therefore will time out.

Is your authentication server down or update server down? Also, if this happens there should be logic to stop checking. You need to disable this check…


Josh

  • Support Staff

July 24, 2018 at 10:35 am

The server that hosts this website is also the server that does the updates, so it’s not down and has not been. May I ask what led you to the conclusion that the admin was crashing because of Event Espresso?


reefbuilders

July 24, 2018 at 12:04 pm

Our enterprise WordPress host notified us of the problem.
?pu_checking_for_updates=1
&pu_request_plugin=event-express-core-reg
&pu_plugin_api=XXXXXXXXXX

etc.

We also ran query-monitor to find the root cause. The plugin is keeps trying to check for updates – we even removed the license key to see if that was the problem to no avail.


Josh

  • Support Staff

July 24, 2018 at 1:14 pm

That particular request is scheduled with a wp_cron event that’s set for once every 24 hours, and there is a way to manually trigger it by going to the Event Espresso > General Settings page, then saving.

I asked someone to check, and sure enough, ee.com has been getting a lot of requests from your site in the last seven days. Yours is the one on the far left in this graph:

https://slack-files.com/T02SY781D-FBW7KH9R8-59186cbfa3

So if there’s a possibility of a caching-related/cron-related event where something got stuck, and that request was part of what got stuck, then that might explain why all the requests.

Another possibility is there’s another plugin on the site that also does a POST request with site_license_key, which would trigger more update requests. Do you have other plugins on the site that verify a support license key?

As a test, (if you are willing), you could comment out the $this->trigger_update_check() in pue-client.php around line 792.
(it’s within the hook_into_wp_update_api method).

If that fixes things on your end please let us know and we can use that to help prioritize a fix.


reefbuilders

July 26, 2018 at 9:02 am

where is pue-client.php located?


Josh

  • Support Staff

July 26, 2018 at 10:01 am

in the core/third_party_libs/pue/ directory of the ee4 core plugin.


reefbuilders

July 26, 2018 at 12:10 pm

We just made the change and pushed it to production.


reefbuilders

July 26, 2018 at 12:15 pm

If we deactivate it, will the database data still be there for EE if we activate it again? We have several ticket registrations.


Josh

  • Support Staff

July 26, 2018 at 12:26 pm

Do you mean deactivate the plugin or deactivate the PUE license key check?

In either case, the database data will still be there for Event Espresso. Event Espresso does not run uninstall scripts if you deactivate the plugin, and you can even delete the plugin and the data will remain.


reefbuilders

July 26, 2018 at 12:49 pm

we commented out the line – it does look to be fixing the issue of a slow admin


Josh

  • Support Staff

July 27, 2018 at 9:32 am

OK good, so it’d be best if you can leave that code commented out for now. This is a good opportunity for the developer of the plugin update engine to make that part of the code more resilient.

We’ll let you know when there’s an update to the plugin that includes this improvement.


reefbuilders

July 30, 2018 at 3:43 pm

it looks like it was only temporary – the admin site is crawling again.


Josh

  • Support Staff

July 30, 2018 at 3:51 pm

Is $this->trigger_update_check(); still commented out?


reefbuilders

July 30, 2018 at 4:41 pm

yes –


Josh

  • Support Staff

July 30, 2018 at 4:51 pm

And the plugin is still checking for updates even with that code commented out?


reefbuilders

July 30, 2018 at 5:00 pm

yes, connection timed out after 10001 milliseconds. PluginUpdateEngineChecker–>requestInfo()


Josh

  • Support Staff

July 30, 2018 at 5:36 pm

This is looking more and more like something else is triggering those requests. Hopefully this will stop it:

Add the following to a site specific plugin:

add_filter(
    'FHEE__EE_System__brew_espresso__load_pue',
    '__return_false'
);

Then activate the plugin.

Link to the documentation on how to do a site specific plugin:

http://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

The support post ‘API – Timeout Calls crashing admin on high traffic site’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 2 weeks, 5 days ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!