We are tracking Facebook Page and Post metrics for a number of clients, and we have some questions regarding high CPU intensity and too many calls for Post/comments - according to what is being reported by the developer insights console (Insights -> Developer -> Activity & Errors). The documentation is somewhat unclear on the limits and restrictions for the Graph API, and we'd simply like to make sure we have the correct understanding of what resources we have available.
We are working on optimizing our software and queries to decrease the error rate and number of requests. Related to this work we have a few questions:
We have changed to use FQL queries instead of regular Graph API requests for fetching Post comments, which enables us to fetch comments for several posts per request. This have lead to a significant decrease in number of requests. We use a query with page_id IN (PAGE_ID_1, PAGE_ID_2, ....). Will this increase the CPU intensity compared with a regular Graph API request?
We have also implemented throttling of requests on our end to make sure we distribute our requests evenly over time and not in big bursts. For Page comments, we make sure the maximum number of request do not exceed 300 over a 10 minute period. In other words, we are limiting the number of Page comment requests to 0.5 per second or 30 per minute. Is this still to high?
Once request limits are exceeded, we assume this is for an access token, not APP ID? So if one of our clients has been over-using resources, our APP will still continue working on behalf of our other clients which have different access tokens?
In the developer console, under the Insights -> Developer -> Activity & Errors page for our app, the API Throttling table have a time above it. As an example 1 hour, 14 minutes. What does this time indicate, how often is this table updated, and how old are the numbers?
We are getting a small amount of errors with response code 500. Are these errors typically a result of exceeding request and/or CPU limits? If not, are there any ways to determine what is actually causing them, and if there is something we can do on our end to fix it?
We'd appreciate any input on and confirmation of our assumptions.