There have been too many calls from this ad-account. Wait a bit and try again
Asked Answered
R

1

6

I am trying to fetch the reportstats from our account. I need to make async calls because otherwise I would get and error that the data is to old.

When I create multiple requests I will get the error: "There have been too many calls from this ad-account. Wait a bit and try again."

I have only made about 30 request in a small time because of the way the async reports work. Is there a better way to fetch te reporting data? And if there is not is there a way to see the request score that is mentioned in the documentation?

And an other question will be, is there a difference in the amount of request when your app is on development access?

Thanks in advance, Jorik

Respectability answered 29/9, 2014 at 8:15 Comment(6)
Hi Jorik, there is almost no difference in the amount of request whether the app is in development or production. try to run the reports in some time gaps like every 5 mins only, if you continuously hit the fb api endpoint then it will cause the errors & even your reports wont complete compiling in async jobs. Check the status of your async job in every 5-15 mins gap if its done then start fetching the data.Permutation
This happens sometimes if you have re-generated the token and are still using the previous one. Make sure you are using the updated token.Overthecounter
Got the same error - all I was doing was creating Six Campaigns one after the other - each with one adset and one ad. Pretty much the tutorial code - with small changes. Gave me the rate limit exceeded error after the third campaign! The rate limit could not be so low - could it? must be something else.Pussyfoot
why none of the facebook developers are answering questions on stackoverflow. Is it too hard for them to just make few things clear to us users. Nowhere they mention number of all, time between calls or when to make api call again ?? any idea guys ?Bashee
Was able to use api again after few minutes, looks like fb servers can't handle the frequency with which I am making requests. I am building a app and now i think it is better to build it completely and then starting testing everything.Bashee
Hey @MayankRJain, did you manage to solve it? I'm having the same issue.. I have 12 campaigns to create and it always fails :(Officinal
B
2

First point, according to access level docs here there is heavy rate limiting on the apps that are in development stage.

Second, To fetch reports there are multiple endpoints that, such as ad account wise reports, campaign wise reports, ad wise reports, here is a link to the docs for Insights API available params are :

  1. act_AD_ACCOUNT_ID/insights
  2. CAMPAIGN_ID/insights
  3. ADSET_ID/insights
  4. AD_ID/insights

Lastly, about rate limiting in marketing api. It is done as a sliding window method which means there is no actual track of number of requests per day or something, its just that a lot of requests in short amount of time is not allowed.

two things you can do are, first see the response of api and if the response is ratelimit error, stop the request. second, use batch requests

Here is a gist from troubleshooting guide on limits Troubleshooting

Timeouts

The most common issues causing failure at this endpoint are too many requests and time outs:

On /GET or synchronous requests, you can get out-of-memory or timeout errors. On /POST or asynchronous requests, you can possibly get timeout errors. For asynchronous requests, it can take up to an hour to complete a request including retry attempts. For example if you make a query that tries to fetch large volume of data for many ad level objects. Recommendations

There is no explicit limit for when a query will fail. When it times out, try to break down the query into smaller queries by putting in filters like date range. Unique metrics are time consuming to compute. Try to query unique metrics in a separate call to improve performance of non-unique metrics. Rate Limiting

The Facebook Insights API utilizes rate limiting to ensure an optimal reporting experience for all of our partners. For more information and suggestions, see our Insights API Limits & Best Practices.

Bashee answered 16/10, 2017 at 13:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.