Я добавил конфигурационный файл ebextensions, упомянутый в этой теме .Я использую рабочую среду, основанную на примере приложения Python, найденного в aws doc .
Ошибка чтения из блока try catch, который есть у меня для следующей строки:
request_body = environ['wsgi.input'].read(request_body_size).decode('utf-8')
Но это все еще не работает.Интересно, кто-нибудь знает, какой другой конфиг мне нужно включить.Спасибо
files:
"/etc/httpd/conf.d/wsgi_custom.conf":
mode: "000644"
owner: root
group: root
content: |
WSGIApplicationGroup %{GLOBAL}
Я также попробовал то, что нашел в этой ветке aws .
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 10M;
# These are to increase the timeout from the default 60 seconds for nginx. Only used for worker instances,
# otherwise nginx returns a 504 error
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
send_timeout 3600;
Журнал:
[Wed Sep 26 00:50:24.748366 2018] [mpm_prefork:notice] [pid 7009] AH00169: caught SIGTERM, shutting down
[Wed Sep 26 00:50:26.011251 2018] [suexec:notice] [pid 7926] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Sep 26 00:50:26.064082 2018] [so:warn] [pid 7926] AH01574: module wsgi_module is already loaded, skipping
[Wed Sep 26 00:50:26.067157 2018] [http2:warn] [pid 7926] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Wed Sep 26 00:50:26.067176 2018] [http2:warn] [pid 7926] AH02951: mod_ssl does not seem to be enabled
[Wed Sep 26 00:50:26.068090 2018] [lbmethod_heartbeat:notice] [pid 7926] AH02282: No slotmem from mod_heartmonitor
[Wed Sep 26 00:50:26.068210 2018] [:warn] [pid 7926] mod_wsgi: Compiled for Python/3.6.2.
[Wed Sep 26 00:50:26.068223 2018] [:warn] [pid 7926] mod_wsgi: Runtime using Python/3.6.5.
[Wed Sep 26 00:50:26.086918 2018] [mpm_prefork:notice] [pid 7926] AH00163: Apache/2.4.33 (Amazon) mod_wsgi/3.5 Python/3.6.5 configured -- resuming normal operations
[Wed Sep 26 00:50:26.086960 2018] [core:notice] [pid 7926] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Sep 26 00:54:12.992860 2018] [core:error] [pid 7932] [client 127.0.0.1:32862] Script timed out before returning headers: application.py
[Wed Sep 26 00:54:15.466915 2018] [core:error] [pid 7934] [client 127.0.0.1:32868] Script timed out before returning headers: application.py
[Wed Sep 26 00:54:22.214849 2018] [core:error] [pid 7941] [client 127.0.0.1:32884] Script timed out before returning headers: application.py