问题
I've been using Heroku for over a year now to deploy my Django app.
Suddenly though (without any major changes) everytime I push to Heroku, I'm getting the error, (Utils::TimeoutError)
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:appname.git'
It happens everytime, but at different stages of installing all the packages in my requirements.txt file.
What could be causing this?
回答1:
The docs for the python build pack talk about this
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:
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.
You can see more here https://github.com/heroku/heroku-buildpack-python/wiki/Troubleshooting#build-timeout.
来源:https://stackoverflow.com/questions/16173467/everytime-i-deploy-to-heroku-i-get-a-timeout-error