impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
340 stars 191 forks source link

GiveWP.com reliability should not affect GiveWP customer site reliability #5862

Closed JasonTheAdams closed 3 years ago

JasonTheAdams commented 3 years ago

Details

GiveWP checks whether to see GiveWP add-ons are premium or free add-ons. The way it does this is by querying all the EDD products on givewp.com, and then checking to see if the add-on appears in that list. The current method was introduced in GiveWP 2.9.2.

The problem is that the code does not handle failures well. A couple things compound into a major problem when givewp.com is, for some reason, down:

  1. The add-on information is only cached if it receives good data
  2. Every GiveWP add-on runs the function to check itself
  3. Every failed call takes 5 seconds before it times out

So if you have 6 add-ons, that's 5 seconds per add-on, so the whole site hangs up for 6 x 5 = 30 seconds. Mosts hosts will simply timeout the whole request at this point. 💥😱🔥

GiveWP.com going down should not be able to take down customer sites.

Acceptance Criteria

canny[bot] commented 3 years ago

This issue has been linked to a Canny post: Dashboard slowness/timeouts related to Warnings for Add-ons List Manager :tada: