【问题标题】:Google App Engine repeatedly deployingGoogle App Engine 重复部署
【发布时间】: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


【解决方案1】:

好的,它的工作是正确的知道。这真的很奇怪,但请确保。 你包括一个.ruby-version 文件并在那里添加一个你想要的红宝石版本,例如2.2.3,我添加了.dockerignore 并在那里添加

.git
log/*
tmp/*

所以知道只需使用 google cloud idk 再次部署它

gcloud preview app deploy

所以这对我有用。我希望它也对你有用。

【讨论】:

    猜你喜欢
    • 2015-02-19
    • 2015-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-02
    • 1970-01-01
    相关资源
    最近更新 更多