Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook error: "An unexpected error has occurred. Please retry your request later."

Starting last Friday, 7/13, we've been getting the "An unexpected error has occurred. Please retry your request later." error for our OG Graph object posts. With the same API post rate, our error rate for these API calls went from 0.13% to 65% (less than 1% to 65%) within about a minute. Saturday it dropped to about 46%, and it's currently at 28%.

We normally have these automatically retried, but we had to disable that when the error rate rose because it choked our queue.

If we manually retry any of the failed ones, they fail every time with this error.

This seems to be happening only for one of our OG action/object combos - "earn medal". All our other combos work fine with manual testing.

Since our error rate jumped suddenly, is very high, and retrying doesn't work, something obviously seems wrong.

Could we be over a rate limit? Did something happen to our "medal" OG Object?

like image 326
Brian Ray Avatar asked Jan 31 '26 10:01

Brian Ray


2 Answers

After some more manual testing, we realized this was only happening for a specific instance of our "medal" OG Object (id 4). Others worked fine. So we tried some of those instances (ids 1 through 5) in FB's URL debugger, and they all parsed fine.

Then tried to post those medals again manually, and id 4 then worked every time.

It seems like FB automatically scraped our OG Objects last Friday, and the medal id 4 object request failed for some reason, causing that object's cache to disappear on FB's end.

So if you see a sudden, large increase in OG Object API call errors, try manually re-caching the object instances that failed.

like image 58
Brian Ray Avatar answered Feb 02 '26 00:02

Brian Ray


It's worthing noting this error can occur somewhat randomly without reasonable cause. I've seen this many times when fetching facebook posts for a page depending on the limit parameter. If I ask for facebook posts of a page with limit 100, I'll get the error:

{
  error: {
    message: "An unexpected error has occurred. Please retry your request later.",
    type: "OAuthException",
    is_transient: true,
    code: 2
  }
}

If I ask for it with limit 2, I won't get the error. You may be thinking a timeout could cause this. It's possible because I've seen that before (when you request a ton of data) but in this case increasing the limit to 3 also causes the error. limit=2 is fine while limit=3 causes the above error. That's a bug

like image 26
Tony Avatar answered Feb 01 '26 23:02

Tony



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!