Docker-compose + Heroku + Django + Gunicorn H14 error - django

I am getting an H14 Heroku error when trying to deploy my built docker image to heroku.
Since the Heroku documentation says a CMD command is required and it appears that the commands in the Procfile are not actually run I am at a bit of a loss as to what to do.
My heroku error log : `
2017-11-01T11:19:47.714787+00:00 app[globus.1]: Post-processed 'admin/css/forms.css' as 'admin/css/forms.2003a066ae02.css'
2017-11-01T11:19:47.715387+00:00 app[globus.1]:
2017-11-01T11:19:47.715389+00:00 app[globus.1]: 0 static files copied to '/globus/staticfiles', 62 unmodified, 24 post-processed.
2017-11-01T11:20:48.337975+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=kolland-globus-1.herokuapp.com request_id=e2a6eda9-e2bf-477b-9987-b5995d110b0e fwd="2.87.181.37" dyno= connect= service= status=503 bytes= protocol=https
2017-11-01T11:20:48.683132+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=kolland-globus-1.herokuapp.com request_id=eb2e00ee-826a-4ddd-aa22-78e242612e8f fwd="2.87.181.37" dyno= connect= service= status=503 bytes= protocol=https
2017-11-01T11:20:48.766644+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=kolland-globus-1.herokuapp.com request_id=60d645a6-8657-4236-80d9-7a8f8e880640 fwd="2.87.181.37" dyno= connect= service= status=503 bytes= protocol=https
Output of heroku ps:
=== globus (Free): /start.sh (1)
globus.1: up 2017/11/01 13:19:44 +0200 (~ 17m ago)
Heroku Control Panel for the app says:
globus /start.sh
My code is as follows:
1) The start.sh script:
#!/bin/bash
python manage.py migrate # Apply database migrations
python manage.py collectstatic --clear --noinput # clearstatic files
python manage.py collectstatic --noinput # collect static files
# Prepare log files and start outputting logs to stdout
exec gunicorn globus.wsgi --bind 0.0.0.0:$PORT --workers 3
#python manage.py runserver 0.0.0.0:$PORT --settings=globus.settings.production
2) The docker-compose file :
version: '2'
services:
globus:
build: .
image: globus:latest
ports:
- "5000:5000"
env_file: .env
volumes:
- ./globus:/opt/globus
3) Dockerfile:
FROM python:2.7.14
ENV PYTHONUNBUFFERED 1
ADD ./requirements.txt /requirements.txt
ADD ./start.sh /start.sh
ADD . /globus
RUN pip install -r requirements.txt
RUN groupadd -r django && useradd -r -g django django
RUN chown -R django /globus && chmod +x start.sh && chown django start.sh
WORKDIR /globus
CMD ["/start.sh"]
What I've tried ::
CMD [ "python", "./manage.py", "runserver", "0.0.0.0:$PORT", "--settings=globus.settings.production" ]
CMD ["exec", "gunicorn", "globus.wsgi", "-b", "0.0.0.0:$PORT", "--log-file", "-"]
CMD exec gunicorn globus.wsgi -b 0.0.0.0:$PORT --log-file -
CMD ["/start.sh"]
&& ENTRYPOINT ["/start.sh"](without exec gunicorn cmd) + CMD exec gunicorn globus.wsgi -b 0.0.0.0:$PORT
Additionally I've run in the docker-compose file:
command: python manage.py runserver 0.0.0.0:$PORT --settings=globus.settings.production
command: python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic && python manage.py runserver 0.0.0.0:$PORT --settings=globus.settings.production
Notes:
**
Running docker-compose build + up locally works for all aforementioned aproaches provided I change $PORT to 5000.
**
I have a feeling it might have something to do with permissions because I am running docker-compose build + up as root user although am not sure how to change the Dockerfile to avoid that beyond the two lines I have added.
dyno= connect= service= in the error logs I believe means that the app is somehow either crashing or not exposed to the heroku router.
The databse is the Heroku Postgresql Addon and the credentials are stored in an env file. The addon works even if I run docker-compose up on my local machine.
I have a working heroku app that was deployed via git.
When I did an:
heroku run bash
> ls
I could see the file structure
When I do the same on for this app I get nothing
Any help would be greatly appreciated!!!
Result of the Netstat command:
2017-11-01T20:50:11.186705+00:00 app[globus.1]: [2017-11-01 20:50:11 +0000] [6] [INFO] Starting gunicorn 19.7.1
2017-11-01T20:50:11.187111+00:00 app[globus.1]: [2017-11-01 20:50:11 +0000] [6] [INFO] Listening at: http://0.0.0.0:18815 (6)
2017-11-01T20:50:11.202914+00:00 app[globus.1]: [2017-11-01 20:50:11 +0000] [12] [INFO] Booting worker with pid: 12
2017-11-01T20:50:11.187194+00:00 app[globus.1]: [2017-11-01 20:50:11 +0000] [6] [INFO] Using worker: sync
2017-11-01T20:50:11.192252+00:00 app[globus.1]: [2017-11-01 20:50:11 +0000] [11] [INFO] Booting worker with pid: 11
2017-11-01T20:50:11.247884+00:00 app[globus.1]: [2017-11-01 20:50:11 +0000] [13] [INFO] Booting worker with pid: 13
2017-11-01T20:50:16.019831+00:00 heroku[globus.1]: Process exited with status 0
2017-11-01T20:50:15.952136+00:00 app[globus.1]: (Not all processes could be identified, non-owned process info
2017-11-01T20:50:15.957398+00:00 app[globus.1]: Active Internet connections (servers and established)
2017-11-01T20:50:15.957400+00:00 app[globus.1]: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
2017-11-01T20:50:15.952156+00:00 app[globus.1]: will not be shown, you would have to be root to see it all.)
2017-11-01T20:50:15.957400+00:00 app[globus.1]: tcp 0 0 0.0.0.0:18815 0.0.0.0:* LISTEN 6/python
2017-11-01T20:50:16.031459+00:00 heroku[globus.1]: State changed from up to crashed
2017-11-01T20:51:19.828010+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=kolland-globus-1.herokuapp.com request_id=59003956-da54-4a6f-921f-70ed4930fc3e fwd="2.87.181.37" dyno= connect= service= status=503 bytes= protocol=https
2017-11-01T20:51:19.652507+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=kolland-globus-1.herokuapp.com request_id=6a090f48-214f-457b-9471-09e2995817fe fwd="2.87.181.37" dyno= connect= service= status=503 bytes= protocol=https

Related

heroku H10 issue

I am geting the Error:
at=error code=H10 desc="App crashed" method=GET path="/" host=quiz-iu.herokuapp.com request_id=9ee6412c-b248-4eeb-8eba-066f07b38a4f
fwd="93.201.118.59" dyno= connect= service= status=503 bytes= protocol=https
2022-12-19T17:47:36.743985+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=quiz-iu.herokuapp.com request_id=071363bb-8ce2-4eed-bdc5-93cd3b39581f fwd="93.201.118.59" dyno= connect= service= status=503 bytes= protocol=https
And if I set into the consul : heroku run rails console,
I get: bash: line 1: rails: command not found
Can someone please help me fix this issue?
A few things to confirm:
Make sure that git is initialized in the same directory where the manage.py file is located.
Make sure that the Procfile is written with the capital P and the rest in small letters, as written in this sentence.
Make sure that the Procfile, requirements.txt, and runtime.txt (if you have one) are in the same directory as the manage.py file.
Copy-paste the following line as it is in your Procfile and replace djangoheroku with the name of your Django project.
web: gunicorn djangoheroku.wsgi --log-file -
Note: Don't forget to replace djangoheroku with the name of your Django project.

Heroku Application Erros Django

I don't understand why this application error. I followed djangogirls-extension deploy tutorial.
here is the output of >heroku logs --tail --app srms-demo command
2019-02-09T02:31:06.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9822ee2e-0b33-4163-9dd1-5d9897a5b7c7/activity/builds/e01929d2-7a31-45fe-97c3-90eab053a667
2019-02-09T02:47:00.587192+00:00 heroku[run.9364]: State changed from up to complete
2019-02-09T02:50:39.686144+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=srms-demo.herokuapp.com request_id=5859852f-3ae2-47c8-9f6e-3ba05f1c5bbb fwd="43.245.123.100" dyno= connect= service= status=503 bytes= protocol=https
2019-02-09T03:10:39.561398+00:00 heroku[run.2791]: Process exited with status 0
2019-02-09T03:11:20.141798+00:00 heroku[run.6801]: State changed from up to complete
2019-02-09T03:15:30.610720+00:00 heroku[web.1]: State changed from crashed to starting
then is visited error link and found this
-----> Python app detected
! Requested runtime (python-3.7) is not available for this stack (heroku-18).
! Aborting. More info: https://devcenter.heroku.com/articles/python-support
! Push rejected, failed to compile Python app.
! Push failed
Update
After changing runtime.txt to python-3.7.1 pushed it on Heroku master
here is the output of heroku logs --tail --app srms-demo command
2019-02-09T02:31:06.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9822ee2e-0b33-4163-9dd1-5d9897a5b7c7/activity/builds/e01929d2-7a31-45fe-97c3-90eab053a667
2019-02-09T02:47:00.587192+00:00 heroku[run.9364]: State changed from up to complete
2019-02-09T02:50:39.686144+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=srms-demo.herokuapp.com request_id=5859852f-3ae2-47c8-9f6e-3ba05f1c5bbb fwd="43.245.123.100" dyno= connect= service= status=503 bytes= protocol=https
2019-02-09T03:10:39.561398+00:00 heroku[run.2791]: Process exited with status 0
2019-02-09T03:11:20.141798+00:00 heroku[run.6801]: State changed from up to complete
2019-02-09T03:15:30.610720+00:00 heroku[web.1]: State changed from crashed to starting
2019-02-09T06:28:53.311604+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=srms-demo.herokuapp.com request_id=04075507-aa74-4f7b-b303-081b50c4d876 fwd="116.58.205.24" dyno= connect= service= status=503 bytes= protocol=https

Cannot push django app to Heroku

I am trying to deploy a CMS application on Heroku. But when I try
git push heroku master
I am getting the following errors.
Counting objects: 2841, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2775/2775), done.
Writing objects: 100% (2841/2841), 13.35 MiB | 497.00 KiB/s, done.
Total 2841 (delta 917), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.6
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting pkg-resources==0.0.0 (from -r /tmp/build_2e9a3f2d21d5a1b3c5ab348811182510/requirements.txt (line 1))
remote: Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r /tmp/build_2e9a3f2d21d5a1b3c5ab348811182510/requirements.txt (line 1)) (from versions: )
remote: No matching distribution found for pkg-resources==0.0.0 (from -r /tmp/build_2e9a3f2d21d5a1b3c5ab348811182510/requirements.txt (line 1))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to peaceful-olympic-84671.
remote:
To https://git.heroku.com/peaceful-olympic-84671.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/peaceful-olympic-84671.git'
I have already seen many answers to this same question on stack overflow but none of the answers is working for me. Please help.
Update: Removing the pkg-resources from requirements.txt helped. But the application isn't being displayed. It says application errors, check your logs for details.
This is my log file in Heroku.
2018-07-04T13:19:20.003057+00:00 heroku[web.1]: Starting process with command `gunicorn zoomtail.wsgi --log-file -`
2018-07-04T13:19:22.351320+00:00 heroku[web.1]: State changed from starting to crashed
2018-07-04T13:19:22.264506+00:00 app[web.1]: bash: gunicorn: command not found
2018-07-04T13:19:22.329998+00:00 heroku[web.1]: Process exited with status 127
2018-07-04T15:49:08.058951+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=peaceful-olympic-84671.herokuapp.com request_id=b22e6349-7456-4bfe-bb40-7be7b285e027 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:49:08.609553+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=peaceful-olympic-84671.herokuapp.com request_id=cb458cf7-fd71-4342-a3be-e46f258b6072 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:49:44.078076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=peaceful-olympic-84671.herokuapp.com request_id=a3d03045-0204-44e4-9739-afeaa95eb1d0 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:49:45.057346+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=peaceful-olympic-84671.herokuapp.com request_id=dde12264-b1a6-4394-8427-4f431a292a6c fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:52:41.870237+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=peaceful-olympic-84671.herokuapp.com request_id=95caff68-1fc2-4767-a835-e3e51fb867a8 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:52:42.608603+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=peaceful-olympic-84671.herokuapp.com request_id=7b5ad55a-8c59-4c92-8480-a9ed11572306 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
I cannot make sense of the error. Please help.
Remove Following line from requirements.txt before push to heroku.
pkg-resources==0.0.0

heroku $PORT variable in Procfile

Hi have a Django project that I want to deploy on heroku. My procfile looks like this:
web: python subfolder/manage.py runserver $PORT
But my heroku logs tell me that the application did not bind to the port within the required time.
2014-04-17T15:35:20.294741+00:00 heroku[api]: Deploy c456cc6 by my#email.com
2014-04-17T15:35:20.294830+00:00 heroku[api]: Release v17 created by my#email.com
2014-04-17T15:35:31.447035+00:00 heroku[web.1]: Starting process with command `python subfolder/manage.py runserver 14311`
2014-04-17T15:35:32.949252+00:00 app[web.1]: >>> sys.argv: ['subfolder/manage.py', 'runserver', '14311']
2014-04-17T15:35:33.286494+00:00 app[web.1]: >>> sys.argv: ['subfolder/manage.py', 'runserver', '14311']
2014-04-17T15:35:33.296080+00:00 app[web.1]: Validating models...
2014-04-17T15:35:33.296084+00:00 app[web.1]:
2014-04-17T15:35:33.434037+00:00 app[web.1]: 0 errors found
2014-04-17T15:35:33.434129+00:00 app[web.1]: April 17, 2014 - 10:35:33
2014-04-17T15:35:33.434131+00:00 app[web.1]: Django version 1.6.2, using settings 'subfolder.settings'
2014-04-17T15:35:33.434133+00:00 app[web.1]: Starting development server at http://127.0.0.1:14311/
2014-04-17T15:35:33.434134+00:00 app[web.1]: Quit the server with CONTROL-C.
2014-04-17T15:36:31.995497+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-04-17T15:36:31.995711+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-04-17T15:36:33.512080+00:00 heroku[web.1]: Process exited with status 137
2014-04-17T15:36:33.526505+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-17T15:36:33.527696+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-17T15:36:42.946854+00:00 heroku[web.1]: Starting process with command `python subfolder/manage.py runserver 9192`
2014-04-17T15:36:43.989111+00:00 app[web.1]: >>> sys.argv: ['subfolder/manage.py', 'runserver', '9192']
2014-04-17T15:36:44.294956+00:00 app[web.1]: >>> sys.argv: ['subfolder/manage.py', 'runserver', '9192']
2014-04-17T15:36:44.302783+00:00 app[web.1]: Validating models...
2014-04-17T15:36:44.302787+00:00 app[web.1]:
2014-04-17T15:36:44.447995+00:00 app[web.1]: 0 errors found
2014-04-17T15:36:44.448008+00:00 app[web.1]: April 17, 2014 - 10:36:44
2014-04-17T15:36:44.448009+00:00 app[web.1]: Django version 1.6.2, using settings 'subfolder.settings'
2014-04-17T15:36:44.448010+00:00 app[web.1]: Starting development server at http://127.0.0.1:9192/
2014-04-17T15:36:44.448012+00:00 app[web.1]: Quit the server with CONTROL-C.
2014-04-17T15:37:43.446630+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-04-17T15:37:43.446759+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-04-17T15:37:43.456335+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=my-app.herokuapp.com request_id=7eed5b88-2bb3-479e-b268-f538742d8ac9 fwd="91.52.58.207" dyno= connect= service= status=503 bytes=
2014-04-17T15:37:44.608835+00:00 heroku[web.1]: Process exited with status 137
2014-04-17T15:37:44.625259+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-17T15:39:18.516212+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=my-app.herokuapp.com request_id=145aa053-bb2b-4570-8ba6-fa88f2a5b1a6 fwd="91.52.58.207" dyno= connect= service= status=503 bytes=
2014-04-17T15:47:22.827631+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=my-app.herokuapp.com request_id=fe43143f-defd-4756-a61c-e9558dd15ae6 fwd="91.52.58.207" dyno= connect= service= status=503 bytes=
2014-04-17T15:57:27.577848+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-17T15:57:37.742542+00:00 heroku[web.1]: Starting process with command `python subfolder/manage.py runserver 10935`
2014-04-17T15:57:39.224244+00:00 app[web.1]: >>> sys.argv: ['subfolder/manage.py', 'runserver', '10935']
2014-04-17T15:57:39.788496+00:00 app[web.1]: Django version 1.6.2, using settings 'subfolder.settings'
2014-04-17T15
:57:39.788498+00:00 app[web.1]: Starting development server at http://127.0.0.1:10935/
2014-04-17T15:57:39.618885+00:00 app[web.1]: >>> sys.argv: ['subfolder/manage.py', 'runserver', '10935']
2014-04-17T15:57:39.788500+00:00 app[web.1]: Quit the server with CONTROL-C.
2014-04-17T15:57:39.636416+00:00 app[web.1]: Validating models...
2014-04-17T15:57:39.636420+00:00 app[web.1]:
2014-04-17T15:57:39.788202+00:00 app[web.1]: 0 errors found
2014-04-17T15:57:39.788493+00:00 app[web.1]: April 17, 2014 - 10:57:39
2014-04-17T15:58:38.275475+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-04-17T15:58:38.275554+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-04-17T15:58:39.572038+00:00 heroku[web.1]: Process exited with status 137
2014-04-17T15:58:39.588577+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-17T16:04:48.672005+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=my-app.herokuapp.com request_id=fc101c45-45c0-4e46-ad26-a7953619525e fwd="91.52.58.207" dyno= connect= service= status=503 bytes=
It seems like $PORT differs from some time to time. The heroku config however says the following:
(.env) $ heroku config
=== my-app Config Vars
PORT: 33507
Why doesn't it work?
By default the development server binds to localhost only, you must specific that you want to bind to any IP:
web: python subfolder/manage.py runserver 0.0.0.0:$PORT
But running the dev server in production is a very bad idea. You really should be using gunicorn or some other proper server to deploy your project:
web: gunicorn subfolder/yourproject.wsgi
Follow the steps on https://devcenter.heroku.com/articles/getting-started-with-django if you need more guidance.

Heroku Django-Admin 500 Error?

Deployed a new app to Heroku app that runs fine at myapp.herokuapp.com, but throws a 500 Server Error if I try to access the admin backend at myapp.herokuapp.com/admin
INSTALLED_APPS = (
...
'django.contrib.admin',
'gunicorn',
'storages',
# 'django.contrib.admindocs',
)
Here's the log excerpt:
2013-07-10T17:35:28.893320+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -b 0.0.0.0:27294 -w 3 --log-level info`
2013-07-10T17:35:32.298226+00:00 app[web.1]: 2013-07-10 13:35:32 [2] [INFO] Starting gunicorn 0.17.4
2013-07-10T17:35:32.299005+00:00 app[web.1]: 2013-07-10 13:35:32 [2] [INFO] Using worker: sync
2013-07-10T17:35:32.298932+00:00 app[web.1]: 2013-07-10 13:35:32 [2] [INFO] Listening at: http://0.0.0.0:27294 (2)
2013-07-10T17:35:32.312781+00:00 app[web.1]: 2013-07-10 13:35:32 [11] [INFO] Booting worker with pid: 11
2013-07-10T17:35:32.388874+00:00 app[web.1]: 2013-07-10 13:35:32 [12] [INFO] Booting worker with pid: 12
2013-07-10T17:35:32.495370+00:00 heroku[web.1]: State changed from starting to up
2013-07-10T17:35:32.524196+00:00 app[web.1]: 2013-07-10 13:35:32 [13] [INFO] Booting worker with pid: 13
2013-07-10T17:35:59.929850+00:00 heroku[router]: at=info method=GET path=/ host=myapp.herokuapp.com fwd="64.119.130.116" dyno=web.1 connect=0ms service=190ms status=200 bytes=12220
2013-07-10T17:36:04.363323+00:00 heroku[router]: at=info method=GET path=/admin host=myapp.herokuapp.com fwd="64.119.130.116" dyno=web.1 connect=0ms service=4ms status=301 bytes=5
2013-07-10T17:36:04.872523+00:00 heroku[router]: at=info method=GET path=/admin/ host=myapp.herokuapp.com fwd="64.119.130.116" dyno=web.1 connect=0ms service=481ms status=500 bytes=38
What settings would cause the app to run normally but throw a 500 error on /admin? What am I likely overlooking or missing? Thanks.
Thanks to Magnus' recommendation I added sentry to my project and identified a postgres DatabaseError: relation issue due a project app I hadn't successfully migrated on heroku.
Fix just took a fake and completing the rest of the migration.
heroku run python manage.py migrate app 0016 --fake
heroku run python manage.py migrate
You can add free getsentry addon and receive exception traceback remaining in DEBUG=False in production.
You can also setup plain email notification on errors as admin email.
Without any information about error details it will be hard to give you advice.