質問編集履歴

4

タグの追加

2019/06/23 09:17

投稿

joru
joru

スコア45

test CHANGED
File without changes
test CHANGED
File without changes

3

誤字

2019/06/23 09:17

投稿

joru
joru

スコア45

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- Heorokuで本番環境運用しているRailsサービスを、GAEに移行しようとしています。
5
+ Herokuで本番環境運用しているRailsサービスを、GAEに移行しようとしています。
6
6
 
7
7
  どうやら、ヘルスチェックが終わらずにタイムアウトしてしまっているようです。
8
8
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  ```
16
16
 
17
- ERROR: (gcloud.app.deploy) Operation [apps/fukurikun-backend/operations/0c33ed31-3096-4cb8-add5-e37762788546] timed out. This operation may still be underway.
17
+ ERROR: (gcloud.app.deploy) Operation [apps/[サービス名]/operations/0c33ed31-3096-4cb8-add5-e37762788546] timed out. This operation may still be underway.
18
18
 
19
19
  ```
20
20
 

2

追加情報

2019/06/23 09:12

投稿

joru
joru

スコア45

test CHANGED
File without changes
test CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
 
5
5
  Heorokuで本番環境運用しているRailsサービスを、GAEに移行しようとしています。
6
+
7
+ どうやら、ヘルスチェックが終わらずにタイムアウトしてしまっているようです。
6
8
 
7
9
 
8
10
 
@@ -12,7 +14,7 @@
12
14
 
13
15
  ```
14
16
 
15
- ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.
17
+ ERROR: (gcloud.app.deploy) Operation [apps/fukurikun-backend/operations/0c33ed31-3096-4cb8-add5-e37762788546] timed out. This operation may still be underway.
16
18
 
17
19
  ```
18
20
 
@@ -36,6 +38,20 @@
36
38
 
37
39
 
38
40
 
41
+ liveness_check:
42
+
43
+ path: "/healthcheck"
44
+
45
+
46
+
47
+ readiness_check:
48
+
49
+ path: "/healthcheck"
50
+
51
+ app_start_timeout_sec: 3600
52
+
53
+
54
+
39
55
  env_variables:
40
56
 
41
57
  SECRET_KEY_BASE: [secret_key]
@@ -44,78 +60,28 @@
44
60
 
45
61
 
46
62
 
47
- ### 試したこと
63
+ ```ruby
64
+
65
+ class GaeController < ApplicationController
66
+
67
+ protect_from_forgery :except => [:healthcheck]
68
+
69
+ def healthcheck
70
+
71
+ render text:'ok'
72
+
73
+ end
74
+
75
+ end
48
76
 
49
77
  ```
50
78
 
51
- gcloud config set app/cloud_build_timeout 1000
79
+ ```ruby
52
80
 
53
- ```
54
-
55
- など、タイムアウトの時間を伸ばしたり、
56
-
57
- ```
58
-
59
- env: flex
60
-
61
- runtime: ruby
81
+ # route.rb
62
-
63
- entrypoint: bundle exec ruby app.rb
64
82
 
65
83
 
66
84
 
67
- # This sample incurs costs to run on the App Engine flexible environment.
68
-
69
- # The settings below are to reduce costs during testing and are not appropriate
70
-
71
- # for production use. For more information, see:
72
-
73
- # https://cloud.google.com/appengine/docs/flexible/ruby/configuring-your-app-with-app-yaml
74
-
75
- manual_scaling:
76
-
77
- instances: 1
78
-
79
- resources:
80
-
81
- cpu: 1
82
-
83
- memory_gb: 0.5
84
-
85
- disk_size_gb: 10
86
-
87
-
88
-
89
- liveness_check:
90
-
91
- path: "/liveness_check"
92
-
93
- check_interval_sec: 30
94
-
95
- timeout_sec: 4
96
-
97
- failure_threshold: 2
98
-
99
- success_threshold: 2
100
-
101
-
102
-
103
- readiness_check:
104
-
105
- path: "/readiness_check"
85
+ get '/healthcheck' => 'gae#healthcheck'
106
-
107
- check_interval_sec: 5
108
-
109
- timeout_sec: 4
110
-
111
- failure_threshold: 2
112
-
113
- success_threshold: 2
114
-
115
- app_start_timeout_sec: 300
116
86
 
117
87
  ```
118
-
119
- エラー分に書いてあるreadiness_check:を設定したりしました。
120
-
121
- しかし、エラーは治りせんでした。

1

情報の整理

2019/06/23 09:08

投稿

joru
joru

スコア45

test CHANGED
File without changes
test CHANGED
@@ -25,6 +25,36 @@
25
25
  ```ruby
26
26
 
27
27
  # app.yaml
28
+
29
+
30
+
31
+ entrypoint: bundle exec rackup --port $PORT
32
+
33
+ env: flex
34
+
35
+ runtime: ruby
36
+
37
+
38
+
39
+ env_variables:
40
+
41
+ SECRET_KEY_BASE: [secret_key]
42
+
43
+ ```
44
+
45
+
46
+
47
+ ### 試したこと
48
+
49
+ ```
50
+
51
+ gcloud config set app/cloud_build_timeout 1000
52
+
53
+ ```
54
+
55
+ など、タイムアウトの時間を伸ばしたり、
56
+
57
+ ```
28
58
 
29
59
  env: flex
30
60
 
@@ -84,34 +114,8 @@
84
114
 
85
115
  app_start_timeout_sec: 300
86
116
 
87
-
88
-
89
- env_variables:
90
-
91
- SECRET_KEY_BASE: [secret_key]
92
-
93
117
  ```
94
118
 
95
-
96
-
97
- ### 試したこと
98
-
99
- ```
100
-
101
- gcloud config set app/cloud_build_timeout 1000
102
-
103
- ```
104
-
105
- など、タイムアウトの時間を伸ばしたり、
106
-
107
- ```
108
-
109
- readiness_check:
110
-
111
- app_start_timeout_sec: 300
112
-
113
- ```
114
-
115
- エラー分に書いてあるこちらを設定したりしました。
119
+ エラー分に書いてあるreadiness_check:を設定したりしました。
116
120
 
117
121
  しかし、エラーは治りせんでした。