【发布时间】:2016-07-13 09:13:28
【问题描述】:
我使用托管 VM 部署了我的 Rails 应用程序。
我成功部署了代码,但是24小时我得到一个503代码和消息:
错误:服务器错误
您请求的服务尚不可用。请在 30 后重试 秒。
这些是我的日志:
看起来应用程序引擎正在循环部署代码。应用引擎为计算引擎启动了五个实例。为什么需要这么多实例?
这是我的 app.yaml:
# Copyright 2015, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START runtime]
runtime: ruby
vm: true
entrypoint: bundle exec rackup -p 8080 -E production config.ru
# [END runtime]
# [START resources]
resources:
cpu: .5
memory_gb: 1.3
disk_size_gb: 10
# [END resources]
# [START scaling]
automatic_scaling:
min_num_instances: 1
max_num_instances: 5
cool_down_period_sec: 60
cpu_utilization:
target_utilization: 0.5
# [END scaling]
【问题讨论】:
-
欢迎来到 SO。请不要使用图片向我们展示基本信息。将其复制并粘贴到问题中,并适当格式化以提高可读性。无法搜索图像,也不允许我们复制/粘贴我们需要重复使用以帮助您的文本。我建议阅读“How to Ask”,包括所有最后一个链接,以及“minimal reproducible example”。
标签: ruby-on-rails ruby google-app-engine google-compute-engine google-cloud-platform