/_ah/start requests in manually scaled python instances

74 views
Skip to first unread message

Soeren Balko

unread,
Sep 1, 2016, 4:45:42 PM9/1/16
to Google App Engine
I am using 2 manually scaled B4 (python27) instances to serve static web assets. As this should configure memory-resident instances that are always on, I was surprised to find the module/service's log to be littered with /_ah/start (warmup) requests (virtually every few milliseconds, probably with every new web session). As the site's latency is not where we want it to be, I am growing concerned that there is something odd with our setup. The app.yaml for this module/service looks like that:

version: 2
runtime: python27
api_version: 1
threadsafe: true
module: site
default_expiration: "2d"
instance_class: B4
manual_scaling:
instances: 2

handlers:
-
url: /proxy/vimeo
script: site_main.app
secure: always
-
url: /auth/vimeo\.html
static_files: static/vimeo.html
upload: static/vimeo.html
secure: always
-
url: '/[^\.]*$'
static_files: static/index.html
upload: static/index.html
secure: always
-
url: /manifest\.webapp
static_files: static/manifest.webapp
upload: static/manifest.webapp
secure: always
mime_type: application/manifest+json
-
url: /assets/(.*)$
static_files: static/assets/\1
upload: static/.*
secure: always
expiration: "31d"
-
url: '/*'
static_dir: static/
secure: always

skip_files:
- '^(.*/)?#.*#$'
- '^(.*/)?.*~$'
- '^(.*/)?.*\.py[co]$'
- '^(.*/)?\..*$'
-
'^(.*/)?.*\.gz'


Any ideas would be much appreciated.

Soeren

Evan Jones

unread,
Sep 1, 2016, 5:47:43 PM9/1/16
to Google App Engine
I have no idea what the problem might be, but we use some manually scaled modules, and I can confirm that we only see /_ah/start on rare occasions (e.g. instance uptime is at least a few hours, and possibly more). I *have* seen this when we run into memory limits, causing our instances to get restarted after every request. However, that is also clearly marked in the logs: the previous log will have the error printed pretty clearly if this is happening.

Sorry this isn't much help. Maybe try handling "/_ah/start" to set some global variable to some random variable, then you can add a handler that serves it. You can address manually scaled instances by number: https://0-dot-module-dot-app.appspot.com/ ; I've done this to count things like "requests per instance".

Good luck,

Evan
Reply all
Reply to author
Forward
0 new messages