Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
438 views
in Technique[技术] by (71.8m points)

Google Appengine: app.yaml basic_scaling strange behavior

I have a very basic app.yaml file. When I deploy the file with this in it:

basic_scaling:
  #max_instances: 11
  #idle_timeout: 10m
#instance_class: B1

everything works. If I un-comment out instance_class: B1 I get the error "class B1 only available for basic_scaling" which it already is so why the error. The other thing is if I leave everything the way it is but un-comment out the max_instances then everything uploads but when I go to the project I get a 500 error. Changing the scaling to automatic and leaving the max_instances uncommented out does not cause errors.

strange behavior!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It works with this format below:

instance_class: B1

basic_scaling:
  max_instances: 11
  idle_timeout: 10m

or

basic_scaling:
  max_instances: 11
  idle_timeout: 10m

instance_class: B1

You misconfigured the app.yaml, the instance_class is not under the basic_scaling attribute.

UPDATE:

If you deploy the app.yaml with comment on the element of instance_class: B1:

#instance_class: B1
basic_scaling:
  max_instances: 11
  idle_timeout: 10m

it will result to default which is instance_class: B2. Then if you also add comment on the max_instances: 11 and idle_timeout: 10m:

#instance_class: B1
basic_scaling:
  #max_instances: 11
  #idle_timeout: 10m

it will deploy your app engine into instance_class: F1 and automatic_scaling.

If you include an actual screenshot of the error in your answer, it can help us to determine the issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...