I have an app that produces: "request was aborted" errors. My users are
getting pissed. So am I. I thought App Engine was meant to scale ?
The app is running up to 40 instances to serve 500 users. All 500 users
will query the app within a 5 second window (like a mini-DDOS). It is
python 2.7 and marked as thread-safe. Why one instance can only serve
under 20 users, I don't know ! Average memory usage is 44MB on F1
instances.
Latency is set at max 500msec. I have tried setting idle instances to
20-Automatic. Billing has been around $30 for the last 12 hours. However
this is CRAZY. It cost me $30 to push out 1.25GB of data to under 500
users (500 is the peak!) ?!?
The stupid part is the code looks like this:
global GAME_DATA
global GAME_DATA_TIMESTAMP
delta = datetime.datetime.now() - GAME_DATA_TIMESTAMP
if delta.total_seconds() < 5.:
# return cached data
game = GAME_DATA
else:
# get new
cg_ref = CurrentGame.get_by_key_name(current_game_key_name)
game = cg_ref.k
GAME_DATA = game
GAME_DATA_TIMESTAMP = datetime.datetime.now()
data = {'s': 'OK', 'g': game.board }
self.response.out.write(json.dumps(data))
Yes, that's right... we don't actually do 500 db queries...
At this point, I think there is some internal throttle with GAE that only
allows a limited number of http connections at once and just kills off the
rest or something.
Can only explain what is going on here, or point me to a competent
consultant who I can pay to tell me how to fix this ?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/Bgk6iG2U7pkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.