質問編集履歴
5
メモリ情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -217,4 +217,10 @@
|
|
217
217
|
```
|
218
218
|
2018/09/30 15:38:30 [info] 2336#0: *210 client closed connection while waiting for request, client: 210.130.XXX.XX, server: 0.0.0.0:80
|
219
219
|
2018/09/30 15:39:31 [info] 2335#0: *217 client timed out (110: Connection timed out) while waiting for request, client: 210.130.XXX.XX, server: 0.0.0.0:80
|
220
|
+
```
|
221
|
+
[2018/09/30 17:20追記]
|
222
|
+
```
|
223
|
+
total used free shared buff/cache available
|
224
|
+
Mem: 1015392 483236 229244 6876 302912 362924
|
225
|
+
Swap: 5242872 0 5242872
|
220
226
|
```
|
4
ログ追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -211,4 +211,10 @@
|
|
211
211
|
root /var/www/hoge/current/public;
|
212
212
|
}
|
213
213
|
}
|
214
|
+
```
|
215
|
+
|
216
|
+
[2018/09/30 15:41追記]
|
217
|
+
```
|
218
|
+
2018/09/30 15:38:30 [info] 2336#0: *210 client closed connection while waiting for request, client: 210.130.XXX.XX, server: 0.0.0.0:80
|
219
|
+
2018/09/30 15:39:31 [info] 2335#0: *217 client timed out (110: Connection timed out) while waiting for request, client: 210.130.XXX.XX, server: 0.0.0.0:80
|
214
220
|
```
|
3
設定ファイルの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -170,11 +170,7 @@
|
|
170
170
|
after_fork do |server, worker|
|
171
171
|
defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
|
172
172
|
end
|
173
|
-
|
174
|
-
|
175
|
-
|
176
173
|
```
|
177
|
-
|
178
174
|
[2018/09/30 10:45追記]
|
179
175
|
505のエラーログって、上記に書いた1つ目の記事の6−2
|
180
176
|
|
@@ -184,4 +180,35 @@
|
|
184
180
|
ここに出力されるという認識だったのですが、リアルタイムでここにログが載りません。
|
185
181
|
ここには最新のエラーログは残っていないのです。
|
186
182
|
エラーレベルが違うせいで表示されないのでしょうか?
|
187
|
-
それとも別の場所に設定されてしまっているのでしょうか?
|
183
|
+
それとも別の場所に設定されてしまっているのでしょうか?
|
184
|
+
```
|
185
|
+
以下が該当アプリ用のnginxの設定になります。(hoge.conf)
|
186
|
+
|
187
|
+
error_log /var/www/hoge/current/log/nginx.error.log;
|
188
|
+
access_log /var/www/hoge/current/log/nginx.access.log;
|
189
|
+
|
190
|
+
client_max_body_size 2G;
|
191
|
+
upstream app_server {
|
192
|
+
|
193
|
+
server unix:/var/www/hoge/current/tmp/sockets/.unicorn.sock fail_timeout=0;
|
194
|
+
}
|
195
|
+
server {
|
196
|
+
listen 80;
|
197
|
+
server_name hogehoge.com;
|
198
|
+
keepalive_timeout 5;
|
199
|
+
root /var/www/hoge/current/public;
|
200
|
+
|
201
|
+
try_files $uri/index.html $uri.html $uri @app;
|
202
|
+
location @app {
|
203
|
+
# HTTP headers
|
204
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
205
|
+
proxy_set_header Host $http_host;
|
206
|
+
proxy_redirect off;
|
207
|
+
proxy_pass http://app_server;
|
208
|
+
}
|
209
|
+
error_page 500 502 503 504 /500.html;
|
210
|
+
location = /500.html {
|
211
|
+
root /var/www/hoge/current/public;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
```
|
2
一部修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -177,7 +177,7 @@
|
|
177
177
|
|
178
178
|
[2018/09/30 10:45追記]
|
179
179
|
505のエラーログって、上記に書いた1つ目の記事の6−2
|
180
|
-
|
180
|
+
|
181
181
|
error_log /var/www/hoge_app/current/log/nginx.error.log;
|
182
182
|
access_log /var/www/hoge_app/current/log/nginx.access.log;
|
183
183
|
|
1
エラーログの出力場所について
title
CHANGED
File without changes
|
body
CHANGED
@@ -173,4 +173,15 @@
|
|
173
173
|
|
174
174
|
|
175
175
|
|
176
|
-
```
|
176
|
+
```
|
177
|
+
|
178
|
+
[2018/09/30 10:45追記]
|
179
|
+
505のエラーログって、上記に書いた1つ目の記事の6−2
|
180
|
+
#各種ログのディレクトリ設定
|
181
|
+
error_log /var/www/hoge_app/current/log/nginx.error.log;
|
182
|
+
access_log /var/www/hoge_app/current/log/nginx.access.log;
|
183
|
+
|
184
|
+
ここに出力されるという認識だったのですが、リアルタイムでここにログが載りません。
|
185
|
+
ここには最新のエラーログは残っていないのです。
|
186
|
+
エラーレベルが違うせいで表示されないのでしょうか?
|
187
|
+
それとも別の場所に設定されてしまっているのでしょうか?
|