NonRetriableException: com.google.apphosting.api.ApiProxy$CancelledException: The API call urlfetch.Fetch() was explicitly cancelled.

464 views
Skip to first unread message

Diego Barreiro

unread,
May 12, 2019, 10:02:40 AM5/12/19
to Google App Engine
Hello,

This error has just appeared yesterday in my project, and I don't understand why:
NonRetriableException: com.google.apphosting.api.ApiProxy$CancelledException: The API call urlfetch.Fetch() was explicitly cancelled.

We haven't launched any update, changed anything. Everything was working fine until yesterday, when suddenly this error appeared.

uzL9wc.jpg


Any idea why this happens?

Thank you,

Diego

George (Cloud Platform Support)

unread,
May 13, 2019, 11:27:22 AM5/13/19
to Google App Engine
Hello Diego, 

This error is indicative of a async urlfetch call, even warped in another call, which did not complete at the time the page finished loading. Solution consists in making sure that any async calls complete before your load is completed. Being a matter of a call in real time, the error may appear even if you didn't change your app's code. 

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching App Engine and Cloud SQL. For coding and programming architecture, such as urlfetch calls, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 

Diego Barreiro

unread,
May 15, 2019, 8:16:45 PM5/15/19
to Google App Engine
Hi George,

Thank you for your response, the issue is now solved.
But we don't really understand the reason, just check these graphs for the error:


09aad0ff1d729547e89166a46304c06f27764098.pnga214e3f9cc78295c989da4003a19b73408ec2019.png



A peak appeared those two days, and then it disappeared. We didn't launch any update, or edited any configuration.

Regards,
Diego

Aref Amiri (Cloud Platform Support)

unread,
May 23, 2019, 6:10:19 PM5/23/19
to Google App Engine

Diego,


Cancelled Exception occurs when the call is cancelled from client side which could happen in a few situations. As George mentioned in previous post, if the call is made asynchronously and not completed or if the calls are sent to in-progress API calls when the overall request reaches its 60 seconds deadline. To mitigate the issue, you can add in re-try logic and make sure calls are completed within the deadline.


I would also suggest to post your detailed questions on Stackoverflow, using the supported Cloud tags, and the community would be able to assist you with technical questions.


Reply all
Reply to author
Forward
0 new messages