Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AppEngine Datastore Timeout Error thrown before 30s limit reached

Using AppEngine Go, I'm consistently seeing this error when reading from tables on the order of 40k entities:

API error 5 (datastore_v3: TIMEOUT): The datastore operation timed out, or the data was temporarily unavailable.

This is happening within 400ms of the query firing.

Is there something else that could cause this error besides hitting a limit on the wall clock?

Thanks!

like image 331
Michael Avatar asked Sep 13 '14 20:09

Michael


1 Answers

Turns out each individual API call has a 5s timeout. If you need more time, you can wrap your context like so:

ctx := appengine.Timeout(appengine.NewContext(req), 30*time.Second)
like image 73
Michael Avatar answered Nov 15 '22 08:11

Michael