pinterest-for-woocommerce icon indicating copy to clipboard operation
pinterest-for-woocommerce copied to clipboard

Create merchant endpoint shouldnt be called repeatedly if there is an error while creating merchants

Open adarshakb opened this issue 3 years ago • 2 comments

Describe the bug:

Recently on pinterest we noticed that as the error rate increased in create merchant (due to rate limiting, which was fixed by increasing the rate limit), RPS also increased. See graph below

From initial research the root cause is mostly due to healthcheck or product sync

Steps to reproduce:

  1. Create a new shop and add it to a new pinterest account
  2. Make sure merchant creation fails on pinterest side
  3. If you have multiple such failed merchant creations, then you will notice that create merchant end point will get called repeatedly

Expected behavior:

When there is an error in API call, e.g in merchant creation it is better to exponentially back off rather than repeatedly try it

Actual behavior:

If there is an error in merchant creation, the create merchant is called repeatedly during health checks and product sync

Additional details:

Screen Shot 2022-01-19 at 3 15 11 PM

adarshakb avatar Jan 25 '22 23:01 adarshakb

Thanks @adarshakb 👍

jconroy avatar Jan 26 '22 00:01 jconroy

Related: https://github.com/woocommerce/pinterest-for-woocommerce/issues/446#issuecomment-1139745708

jconroy avatar Jun 02 '22 08:06 jconroy