0

I followed this tutorial to deploy a basic Django app: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html and everything worked fine.

I then followed this guide: https://realpython.com/blog/python/deploying-a-django-app-to-aws-elastic-beanstalk/ to complete the setup, serve static files and use the S3 bucket.

I then terminated everything because I was going to make changes to the app: eb terminate --all. After two weeks of changes (creating a Django application, creating a Django REST api etc.), I tried to redeploy the app.

But now my environments application health is "degraded". I checked the error logs, and this is what showed up:

[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'

The not dev was something I was printing in my settings.py file and I removed that and redeployed the app. The supervisord.log is this:

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)

I don't have experience with servers and am not sure how to debug this issue. I can post the access_log, eb-activity.log and eb-commandprocessor.log if its needed.

Any idea how to get my environment health to green again?

3
  • 1
    What did AWS support say? You really shouldn't be using EB unless you have some experience with server administration. Perhaps try Heroku instead.
    – EEAA
    May 13, 2017 at 21:18
  • @EEAA I haven't contacted AWS support yet (I don't think I have the membership to have access to technical support, but I'll check it). When I was initially picking how I should deploy my app, because EB was a PAAS, I thought it was the "easier" option but I think I might switch to Heroku now that you mentioned that EB generally requires some experience with server administration. May 13, 2017 at 21:37
  • 1
    If you're not interested in OS-level stuff, then definitely go with heroku.
    – EEAA
    May 13, 2017 at 21:49

0

You must log in to answer this question.

Browse other questions tagged .