I have a GAE app written in Python that provides the back end for a multi-player Android game. The game just got 'featured' on Google Play.
Usage has significantly increased, and I am starting to see errors like the following:
68.48.166.111 - - [05/Jul/2012:19:33:27 -0700] "GET /client/gs HTTP/1.1" 500 0 - "Apache-HttpClient/UNAVAILABLE (java 1.4)" "sven-wordhero.appspot.com" ms=21604 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000031 pending_ms=10963
-
I
2012-07-05 22:33:27.594
Request was aborted after waiting too long to attempt to service your request.
I don't have quota problems (using 1/10th of daily quota atm) and I don't have an upper limit on the number of instances. The code is Python 2.7 and marked thread-safe.
Here is the code that is failing to respond (in about 8% of cases)... actually, I don't even think this code gets a chance to run (GAE just fails to respond to the HTTP GET?):
lg_ref = LastGame.get_by_key_name('current_game')
results = lg_ref.gameStorageKey
out = {'u': results.players,
's': results.scores,
}
return self.response.out.write(json.dumps(out))
Since the game is synchronized, I have about 500 users hit this URL within a 5 second window. No, I cannot use memcache. It is BROKEN. It randomly fails to update the results (even with expiry time set!) and then provides the results from the PREVIOUS game. Users don't like that!