我按照本教程部署了一个基本的 Django 应用程序:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html并且一切正常。
然后我遵循了这个指南:https://realpython.com/blog/python/deploying-a-django-app-to-aws-elastic-beanstalk/完成设置、提供静态文件并使用 S3 存储桶。
然后我终止了一切,因为我要对应用程序进行一些更改:eb terminate --all
。经过两周的更改(创建 Django 应用程序、创建 Django REST api 等),我尝试重新部署该应用程序。
但现在我的环境应用程序健康状况“下降”。我检查了错误日志,结果显示:
[Sat May 13 20:01:01.498070 2017] [auth_digest:notice] [pid 2847] AH01757: generating secret for digest authentication ...
[Sat May 13 20:01:01.498769 2017] [lbmethod_heartbeat:notice] [pid 2847] AH02282: No slotmem from mod_heartmonitor
[Sat May 13 20:01:01.500458 2017] [mpm_prefork:notice] [pid 2847] AH00163: Apache/2.4.25 (Amazon) mod_wsgi/3.5 Python/3.4.3 configured -- resuming normal operations
[Sat May 13 20:01:01.500485 2017] [core:notice] [pid 2847] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sat May 13 20:12:36.899656 2017] [mpm_prefork:notice] [pid 2847] AH00169: caught SIGTERM, shutting down
[Sat May 13 20:12:38.000587 2017] [suexec:notice] [pid 4244] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat May 13 20:12:38.012824 2017] [so:warn] [pid 4244] AH01574: module wsgi_module is already loaded, skipping
[Sat May 13 20:12:38.014609 2017] [auth_digest:notice] [pid 4244] AH01757: generating secret for digest authentication ...
[Sat May 13 20:12:38.015212 2017] [lbmethod_heartbeat:notice] [pid 4244] AH02282: No slotmem from mod_heartmonitor
[Sat May 13 20:12:38.017796 2017] [mpm_prefork:notice] [pid 4244] AH00163: Apache/2.4.25 (Amazon) mod_wsgi/3.5 Python/3.4.3 configured -- resuming normal operations
[Sat May 13 20:12:38.017812 2017] [core:notice] [pid 4244] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sat May 13 20:12:41.098298 2017] [:error] [pid 4250] not dev
[Sat May 13 20:12:42.742155 2017] [:error] [pid 4249] not dev
[Sat May 13 20:12:44.380254 2017] [:error] [pid 4251] not dev
[Sat May 13 20:34:13.493081 2017] [mpm_prefork:notice] [pid 4244] AH00169: caught SIGTERM, shutting down
[Sat May 13 20:34:13.795347 2017] [suexec:notice] [pid 28104] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat May 13 20:34:13.807823 2017] [so:warn] [pid 28104] AH01574: module wsgi_module is already loaded, skipping
[Sat May 13 20:34:13.809483 2017] [auth_digest:notice] [pid 28104] AH01757: generating secret for digest authentication ...
[Sat May 13 20:34:13.810128 2017] [lbmethod_heartbeat:notice] [pid 28104] AH02282: No slotmem from mod_heartmonitor
[Sat May 13 20:34:13.812741 2017] [mpm_prefork:notice] [pid 28104] AH00163: Apache/2.4.25 (Amazon) mod_wsgi/3.5 Python/3.4.3 configured -- resuming normal operations
[Sat May 13 20:34:13.812755 2017] [core:notice] [pid 28104] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
这not dev
是我在文件中打印的内容settings.py
,我将其删除并重新部署了应用程序。内容supervisord.log
如下:
2017-05-13 19:53:14,221 CRIT Supervisor running as root (no user in config file)
2017-05-13 19:53:14,233 INFO RPC interface 'supervisor' initialized
2017-05-13 19:53:14,234 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-05-13 19:53:14,234 INFO supervisord started with pid 2824
2017-05-13 19:53:15,236 INFO spawned: 'httpd' with pid 2847
2017-05-13 19:53:16,339 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-05-13 20:12:36,911 INFO stopped: httpd (exit status 0)
2017-05-13 20:12:37,916 INFO spawned: 'httpd' with pid 4244
2017-05-13 20:12:39,000 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-05-13 20:34:13,693 INFO stopped: httpd (exit status 0)
2017-05-13 20:34:13,696 INFO spawned: 'httpd' with pid 28104
2017-05-13 20:34:14,795 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
我没有使用服务器的经验,也不知道该如何调试这个问题。如果需要的话,我可以发布access_log
。eb-activity.log
eb-commandprocessor.log
有什么想法可以让我的环境健康再次变得绿色吗?