-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting
This guide aims to document any caveats and odd edge-cases for Heroku support and customers.
If you specify a different Python runtime than a previous build, your application’s build cache will be purged.
https://devcenter.heroku.com/articles/python-runtimes#changing-runtimes
A lower level approach is to use the heroku-repo plugin to fully purge the cache:
$ heroku plugins:install https://github.com/lstoll/heroku-repo.git
$ heroku repo:purge_cache -a appname
This is normally caused by a very large number of dependencies being installed at the same time.
Sometimes, this is caused by a Python interpreter upgrade. In this case, you have two options:
-
Add a
runtime.txt
file to your repository that specifies the existing version of python you're using (e.g.python-2.7.3
). Learn more. -
Install all of your dependencies again. I'd recommend pushing once with only half of your dependencies, then once again with all of them. Then you won't hit the timeout.
Once they are installed, they are cached, so you shouldn't run into this again.
Currently, there is no automatic mechanism for uninstalling unneeded modules. This is very rarely an issue. However, if uninstalling a module is required, you will need to purge the build cache.
This normally happens because someone added an app.py
file to their repository.
Sometimes, this occurs when Gunicorn finds another module called 'app' in the PYTHONPATH
. Setting PYTHONPATH
to a fake value resolved the issue:
$ heroku config:set PYTHONPATH=fakepath