Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph API Timeout

I've a Canva app built in C# .NET. To request the Graph API, I use the Facebook C# SDK (https://github.com/facebook/csharp-sdk).

We updated it with the following request modifications:

request.KeepAlive = false;
request.ProtocolVersion = HttpVersion.Version10;
request.Timeout = 1000 * 30;

Sometimes, the requests are very fast (~1.5s), but sometimes (very often), the same request from the same server take more than 30s (response time got with Wireshark).

Note that my requests are pretty simple ("/[user_id]"). Note also that we tried on several platform (from Amazon servers, rackspace, home...) and we got the same results.

Does someone experciences such latency or someone has an idea how to avoid it?

I saw in Graph API documentation that there can be latency, but 30s... it's not what I call a latency :)

Thank you for your help

like image 685
JBS Avatar asked Nov 08 '25 14:11

JBS


1 Answers

its a common problem, that the graph api is sometimes very slow,so there is no solution to make the requests faster.

Only little idea is to make batch requests in stead of a lot single requests http://developers.facebook.com/docs/reference/api/batch/

like image 132
Frederick Behrends Avatar answered Nov 10 '25 14:11

Frederick Behrends



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!