Reputation: 11
We have been using the Google Contacts and Google Calendar API for a few years for our CRM product. Everything has been fine up until 8am this morning when we stared seeing enormous delays in execution of basic REST commands to the Contacts API in particular.
For example, I just created a Google Contact using the API and it took 4 minutes to respond. It did create the contact after 4 minutes, however.
My question is this - is there some kind of DDS thwarting algorithm that is perhaps creating these delays? Has something changed in the API within the last 24 hours? I went into the Google Developer Console and see that for the Google Calendar that there are many successful calls that have been logged. For the Google Contacts API, I am seeing 0 calls that have been logged. Not sure if this relates to the problem, but wanted to mention just in case.
I am using google-api-php-client (the version is from 3/6/2012)
We have no made any changes on our end - but our customers are now seeing time-outs. I was able to trace the code and found that the problem is when we issue s GET like this:
using curl_exec()
We are making the call using the 0.5 version of the PHP API, although I also tested with 1.x version and got same problem. I set a time out value for CURL and get this error back:
Exception HTTP Error: (200) Operation timed out after 100000 milliseconds with 73931 bytes received
I also was able to do a curl_getinfo() and got this back:
[url] => https://www.google.com/m8/feeds/contacts/default/full/?showdeleted=false&max-results=200&start-index=2&key=AIzaSyB4yjI1dfHt-nMmtbk0JUFMqgQzlrRFUlQ [content_type] => application/atom+xml; charset=UTF-8; type=feed [http_code] => 200 [header_size] => 550 [request_size] => 387 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 99.94964 [namelookup_time] => 0.03171 [connect_time] => 0.050253 [pretransfer_time] => 0.116627 [size_upload] => 0 [size_download] => 87801 [speed_download] => 878 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0.387812 [redirect_time] => 0 [redirect_url] => [primary_ip] => 74.125.141.104 [certinfo] => Array ( )
[primary_port] => 443
[local_ip] => 199.230.52.14
[local_port] => 53914
)
What seems quite unusual is the speed_download. It is extremely slow!
Scott.
Upvotes: 0
Views: 859
Reputation: 11
OK, I was able to track the problem down to the server itself. I spoke with the hosting company and when they relocated the server, they had the ethernet port set to half-duplex. They switched to full-duplex and all is working fine now. So, it was a hardware problem.
Upvotes: 1
Reputation: 1632
Based on your description, a bunch of things come to mind. Please read below and I'll try to list all that I could, to help:
Have you checked the developers console to see if you might be hitting the quota limits for the Contacts/Calendar API (I am aware you see a 0 there for contacts, strange behavior though)? Since you mentioned that you've been using both APIs for few years, that would be my first suggestion. It is fairly possible that even though you might not be hitting your Per Day quota limits, you could be hitting your Per Second quota limits, in which case the fix is simple - Increase your Quota Per Second/User value from the Developer's Console. In case you might be hitting both you can easily request for a higher quota from the developers console as well.
However, it is often highly suggested that you have Exponential Back-off Algorithm in place to reduce the number of requests required to get a successful response and maximize the throughput of requests in concurrent environments.
Although I am uncertain why you would see 0 calls logged against your Contacts API. One suggestion would be to check if you're checking the correct project or maybe have used the key/Client secret created from another app in the Developer's console. If the issue persists, I'd suggest reporting it here or contacting support through Developer's console.
And last but not the least, make sure you aren't using a deprecated version of the Contacts API.
Upvotes: 0