Curl SSL and Connection Timeout Intermittently in Facebook Charting API

I think my problem is completely different from the rest questions on Stackoverflow. I've searched and googled everywhere but couldn't find the exact solution or reason for this. Hopefully I can get some information here.

My facebook app using PHP PHP SDK and my apps are working fine. In general, they give several errors. But now all of a sudden my facebook apps can't get user data after authenticate and take too long to load which worked perfectly fine. This sudden change happens with every application, with some users authenticating between them, but in a minor case. To see in the error log, it throws an error like:
CurlException: 28: SSL connection timed out
CurlException: 28: Runtime after 60000 milliseconds with 0 bytes received
Unused CurlException: 28: SSL connection
timed out CurlException: 28: connect () time out!
CurlException: 7: Failed to connect to host

But it's strange that this happens at any time, but this sudden change is automatically stopped, and all applications start working normally and normally, like the previous ones after 5-8 hours. Now I am confused as to what could be causing such a problem? Is this Facebook speed limit? I did nslookup, ping, curl -v, api.facebook.com and it gave a result too. Even my port and firewall rules are fine. Please help friends.

+3


source to share


1 answer


Sometimes network connections will fail. Sometimes remote services fail. You cannot think of invoking a remote service over HTTP over the Internet to third party systems as an acknowledgment of failure. You have to write your software to anticipate this and handle it gracefully. Set reasonable timeouts, find glitches, and be prepared to retry a few times before giving up.



0


source







All Articles