0
votes

I deployed my Rails application using managed VM's.

I deployed the code successfully, but for 24 hours I have gotten a 503 code and the message:

Error: Server Error

The service you requested is not available yet. Please try again in 30 seconds.

These are my logs:

enter image description here

It look's like the application engine is deploying the code in a loop. And the app engine started five instances for the compute engine. Why are so many instances needed?

This is my 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]
1
Welcome to SO. Please don't use images to show us essential information. Copy and paste it into the question, formatting appropriately for readability. Images can't be searched, nor do they allow us to copy/paste text we need to reuse to help you. I'd recommend reading "How to Ask", including all of the last link, and "minimal reproducible example".the Tin Man

1 Answers

0
votes

Okay it work's right know. It's really strange but please make sure. You include a .ruby-version file and add there a ruby version you want for me for example 2.2.3 and I added .dockerignore and add there

.git
log/*
tmp/*

So and know just deploy it again using the google cloud idk with

gcloud preview app deploy

So that did the trick for me. I hope it works for you as well.