回答編集履歴

2

誤字

2020/11/18 02:16

投稿

kwmr8416
kwmr8416

スコア6

test CHANGED
@@ -27,3 +27,247 @@
27
27
 
28
28
 
29
29
  また、不具合ありましたら、お知らせいたします。
30
+
31
+
32
+
33
+
34
+
35
+ 追記
36
+
37
+ 上記の通りgunicornのタイムアウトが今回の不具合の原因でした。
38
+
39
+ gunicornの起動コマンドオプションに
40
+
41
+ 「--log-level=DEBUG」を加えログを出力するようにし、CSVインポートを3件ほど行いました。
42
+
43
+ 以下がターミナルの表示内容です。
44
+
45
+ 前半に設定情報が表示され、後半のログ情報に「WORKER TIMEOUT」が表示されているのがわかります。
46
+
47
+ ```
48
+
49
+ (venv_xxx_project) [app_admin@ip-172-31-36-217 xxx_project]$ gunicorn --bind 127.0.0.1:8000 xxx_project.wsgi --timeout 33 --log-level=DEBUG
50
+
51
+ [2020-11-18 10:55:10 +0900] [10999] [DEBUG] Current configuration:
52
+
53
+ config: None
54
+
55
+ bind: ['127.0.0.1:8000']
56
+
57
+ backlog: 2048
58
+
59
+ workers: 1
60
+
61
+ worker_class: sync
62
+
63
+ threads: 1
64
+
65
+ worker_connections: 1000
66
+
67
+ max_requests: 0
68
+
69
+ max_requests_jitter: 0
70
+
71
+ timeout: 33
72
+
73
+ graceful_timeout: 30
74
+
75
+ keepalive: 2
76
+
77
+ limit_request_line: 4094
78
+
79
+ limit_request_fields: 100
80
+
81
+ limit_request_field_size: 8190
82
+
83
+ reload: False
84
+
85
+ reload_engine: auto
86
+
87
+ reload_extra_files: []
88
+
89
+ spew: False
90
+
91
+ check_config: False
92
+
93
+ preload_app: False
94
+
95
+ sendfile: None
96
+
97
+ reuse_port: False
98
+
99
+ chdir: /home/app_admin/venv_xxx_project/xxx_nippo_20201102/venv_xxx_project/xxx_project
100
+
101
+ daemon: False
102
+
103
+ raw_env: []
104
+
105
+ pidfile: None
106
+
107
+ worker_tmp_dir: None
108
+
109
+ user: 1001
110
+
111
+ group: 1001
112
+
113
+ umask: 0
114
+
115
+ initgroups: False
116
+
117
+ tmp_upload_dir: None
118
+
119
+ secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
120
+
121
+ forwarded_allow_ips: ['127.0.0.1']
122
+
123
+ accesslog: None
124
+
125
+ disable_redirect_access_to_syslog: False
126
+
127
+ access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
128
+
129
+ errorlog: -
130
+
131
+ loglevel: DEBUG
132
+
133
+ capture_output: False
134
+
135
+ logger_class: gunicorn.glogging.Logger
136
+
137
+ logconfig: None
138
+
139
+ logconfig_dict: {}
140
+
141
+ syslog_addr: udp://localhost:514
142
+
143
+ syslog: False
144
+
145
+ syslog_prefix: None
146
+
147
+ syslog_facility: user
148
+
149
+ enable_stdio_inheritance: False
150
+
151
+ statsd_host: None
152
+
153
+ dogstatsd_tags:
154
+
155
+ statsd_prefix:
156
+
157
+ proc_name: None
158
+
159
+ default_proc_name: xxx_project.wsgi
160
+
161
+ pythonpath: None
162
+
163
+ paste: None
164
+
165
+ on_starting: <function OnStarting.on_starting at 0x7f6cc9a7cd40>
166
+
167
+ on_reload: <function OnReload.on_reload at 0x7f6cc9a7ce60>
168
+
169
+ when_ready: <function WhenReady.when_ready at 0x7f6cc9a7cf80>
170
+
171
+ pre_fork: <function Prefork.pre_fork at 0x7f6cc9a8f0e0>
172
+
173
+ post_fork: <function Postfork.post_fork at 0x7f6cc9a8f200>
174
+
175
+ post_worker_init: <function PostWorkerInit.post_worker_init at 0x7f6cc9a8f320>
176
+
177
+ worker_int: <function WorkerInt.worker_int at 0x7f6cc9a8f440>
178
+
179
+ worker_abort: <function WorkerAbort.worker_abort at 0x7f6cc9a8f560>
180
+
181
+ pre_exec: <function PreExec.pre_exec at 0x7f6cc9a8f680>
182
+
183
+ pre_request: <function PreRequest.pre_request at 0x7f6cc9a8f7a0>
184
+
185
+ post_request: <function PostRequest.post_request at 0x7f6cc9a8f830>
186
+
187
+ child_exit: <function ChildExit.child_exit at 0x7f6cc9a8f950>
188
+
189
+ worker_exit: <function WorkerExit.worker_exit at 0x7f6cc9a8fa70>
190
+
191
+ nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7f6cc9a8fb90>
192
+
193
+ on_exit: <function OnExit.on_exit at 0x7f6cc9a8fcb0>
194
+
195
+ proxy_protocol: False
196
+
197
+ proxy_allow_ips: ['127.0.0.1']
198
+
199
+ keyfile: None
200
+
201
+ certfile: None
202
+
203
+ ssl_version: 2
204
+
205
+ cert_reqs: 0
206
+
207
+ ca_certs: None
208
+
209
+ suppress_ragged_eofs: True
210
+
211
+ do_handshake_on_connect: False
212
+
213
+ ciphers: None
214
+
215
+ raw_paste_global_conf: []
216
+
217
+ strip_header_spaces: False
218
+
219
+ [2020-11-18 10:55:10 +0900] [10999] [INFO] Starting gunicorn 20.0.4
220
+
221
+ [2020-11-18 10:55:10 +0900] [10999] [DEBUG] Arbiter booted
222
+
223
+ [2020-11-18 10:55:10 +0900] [10999] [INFO] Listening at: http://127.0.0.1:8000 (10999)
224
+
225
+ [2020-11-18 10:55:10 +0900] [10999] [INFO] Using worker: sync
226
+
227
+ [2020-11-18 10:55:10 +0900] [11002] [INFO] Booting worker with pid: 11002
228
+
229
+ [2020-11-18 10:55:10 +0900] [10999] [DEBUG] 1 workers
230
+
231
+ [2020-11-18 10:55:33 +0900] [11002] [DEBUG] POST /working_listworkinglistimport/
232
+
233
+ [2020-11-18 10:56:07 +0900] [10999] [CRITICAL] WORKER TIMEOUT (pid:11002)
234
+
235
+ [2020-11-18 10:56:07 +0900] [11002] [INFO] Worker exiting (pid: 11002)
236
+
237
+ [2020-11-18 10:56:07 +0900] [11007] [INFO] Booting worker with pid: 11007
238
+
239
+ [2020-11-18 10:56:07 +0900] [11007] [DEBUG] GET /nginx-logo.png
240
+
241
+ [2020-11-18 10:56:07 +0900] [11007] [DEBUG] GET /poweredby.png
242
+
243
+ [2020-11-18 10:56:35 +0900] [11007] [DEBUG] POST /working_listworkinglistimport/
244
+
245
+ [2020-11-18 10:57:09 +0900] [11007] [DEBUG] GET /working_list
246
+
247
+ [2020-11-18 10:57:35 +0900] [11007] [DEBUG] GET /boaform/admin/formLogin
248
+
249
+ [2020-11-18 10:57:57 +0900] [11007] [DEBUG] GET /working_listworkinglistimport/
250
+
251
+ [2020-11-18 10:58:38 +0900] [11007] [DEBUG] POST /working_listworkinglistimport/
252
+
253
+ [2020-11-18 10:59:08 +0900] [11007] [DEBUG] GET /working_list
254
+
255
+ [2020-11-18 10:59:14 +0900] [11007] [DEBUG] GET /working_listworkinglistimport/
256
+
257
+ [2020-11-18 10:59:27 +0900] [11007] [DEBUG] POST /working_listworkinglistimport/
258
+
259
+ [2020-11-18 11:00:00 +0900] [10999] [CRITICAL] WORKER TIMEOUT (pid:11007)
260
+
261
+ [2020-11-18 11:00:00 +0900] [11007] [INFO] Worker exiting (pid: 11007)
262
+
263
+ [2020-11-18 11:00:00 +0900] [11025] [INFO] Booting worker with pid: 11025
264
+
265
+ [2020-11-18 11:00:00 +0900] [11025] [DEBUG] GET /poweredby.png
266
+
267
+ [2020-11-18 11:00:00 +0900] [11025] [DEBUG] GET /nginx-logo.png
268
+
269
+ ```
270
+
271
+ 以上で今回の件は、解決とさせていただきます。
272
+
273
+ ありがとうございました。

1

誤字

2020/11/18 02:16

投稿

kwmr8416
kwmr8416

スコア6

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- 「$ gunicorn --bind 127.0.0.1:8000 プロジェクト名.wsgi -D --timeout 999」
19
+ 「$ gunicorn --bind 127.0.0.1:8000 プロジェクト名.wsgi -D --timeout 9999
20
20
 
21
21
 
22
22