简体   繁体   中英

Configuring Google App Engine instance behaviour via app.yaml

I have a fairly simple application deployed using Google App Engine which make use of the PHP runtime. I'm currently looking to ensure that a minimum of one instance remains active at all times. To do this, I've tried adding the following settings to app.yaml :

instance_class: F1
automatic_scaling:
  min_idle_instances: 1
  max_idle_instances: automatic
  min_pending_latency: automatic
  max_pending_latency: automatic

However, upon deploying my changes via the command line I'm warned:

WARNING: Performance settings included in this update are being ignored because your application is not using the Modules feature. See the Modules documentation for more information. Python: ( https://developers.google.com/appengine/docs/python/modules/ ) Java: ( https://developers.google.com/appengine/docs/java/modules/ ) Go: ( https://developers.google.com/appengine/docs/go/modules/ ) PHP: ( https://developers.google.com/appengine/docs/php/modules/ ).

It's my understanding that all Google App Engine applications are deployed with a default module, and that app.yaml acts as the configuration point for that module. As my application is fairly simple I don't have a need for multiple modules and, as such, am simply looking to tweak instance behaviour across the whole of my application.

Could anyone point me in the right direction?

Before the modules were introduced, the instance class and other related settings were configured vie App Engine Console . Go to Administration / Application Settings and check section Performance . However, I am not sure if it is still available since now the console is superseded by Google Develpers Console and there is no such an option available.

Based on the warning message you get, it seems that your application does not follow App Engine directory layout required for modules. Try to check documentation here .

There is one more thing to consider.

If you've changed any of the frontend performance settings in the Admin Console, you can't upload module files until you've migrated manually. A section titled Performance Settings Migration for Modules appears in the Admin Console below the Performance section.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM