Skip to content
kennethreitz edited this page Apr 17, 2013 · 16 revisions

This guide aims to document any caveats and odd edge-cases for Heroku support and customers.

Purging the Cache

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

Build Timeout

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:

  1. 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.

  2. 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.

Uninstall a Module

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.

No module named app.wsgiapp

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
Clone this wiki locally