On Monday, April 22, 2013 2:42:57 PM UTC-5, Vivek Kumar wrote:

> someone please advise on 
> http://stackoverflow.com/questions/16128876/unreliable-fetching-of-google-docs-using-document-api
>
>
A couple of things:

1. From your SO post, you say "*it fails with exception: 
vik.sakshum.sakshumweb.server.common.CommonServiceCode getGoogleDoc: 
Exception is :Unable to complete the HTTP request.*" That's not enough 
detail. Is it a RuntimeException, a SocketTimeoutException, or something 
else? A full stack trace would be useful as well.

2. How frequently are you making Docs requests? Google Docs API has a 
"hidden" rate limit ( 
https://groups.google.com/forum/?fromgroups=#!topic/google-documents-list-api/9tbPGG8LPqA
 ). 
How many times are you fetching the API endpoint? If you're contacting it a 
lot, consider caching the document on your end.

3. URLFetch fails periodically. Write your code with that expectation in 
mind. You can put your code within a while loop and automatically retry the 
urlfetch if it fails. Or put the urlfetch in a task and let task queue 
handle the try attempts for you. In the previous link, 
( 
https://groups.google.com/d/msg/google-documents-list-api/9tbPGG8LPqA/z-fJITofZDEJ
 
) one poster suggested using exponential backoff; that's also a good idea. 


-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

My Go side project: http://invalidmail.com/


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to