Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error deploying to heroku

Please help. I have absoluty no idea what's wrong. The rails app works on my local machine.

If I do this:

git push heroku master

I get this:

Counting objects: 4195, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3944/3944), done.
Writing objects:  72% (3009/4178), 9.99 MiB | 73 KiB/s
Compressing objects: 100% (3944/3944), done.
**Connection to 10.46.xxx.xxx closed by remote host.KiB/s   
error: pack-objects died of signal 13
error: failed to push some refs to '[email protected]:gentle-rain-xxxx.git**
like image 438
fabian Avatar asked Sep 25 '11 14:09

fabian


4 Answers

I just dealt with 24 hours of this hell. I re-cloned repos, destroyed apps, repacked, pruned... the whole 9 yards.

It turned out that I had a .txt file which was ~250MB in size that, even though I had removed it from my master branch, was still present in my local (as well as github) cache.

I checked out this page and inadvertently found my answer here: https://help.github.com/articles/remove-sensitive-data

The .txt file had previously been in the doc/ folder, so I pointed this command at where the file would have been in any commits and ran it.

git filter-branch --index-filter 'git rm --cached --ignore-unmatch doc/US.txt'

This is very useful if you realize you have static assets of some sort that don't have to be in your repo and are causing you to get the signal 13 error.

like image 56
rpearce Avatar answered Sep 22 '22 20:09

rpearce


I was having problems with a repository as small as 130MB. I don't really want to prune my repository, nor do I feel it is necessary.

I can't help but feel this is a problem with git and/or Heroku, I believe a big push should succeed, even over a "slow" or less than ideal connection.

How I solved/worked-around this issue was to spin up an EC2 instance, checkout my repo there, and push to github. In that way, my deploy speed was 4MiB/s (faster than my own 80KiB/s!). Furthermore, in the cases where the push would fail due to some configuration issues, I could quickly tweak and try again.

For more information on this technique, I've written up the full steps on how to spin up an EC2 instance for this purpose here: http://omegadelta.net/2013/06/16/pushing-large-repositories-to-heroku/

like image 41
William Denniss Avatar answered Sep 26 '22 20:09

William Denniss


Hi I had the same problem trying push to cedar stack. I contacted heroku support and they fixed it. Here is what they said:

It appears to be due to a change in our git server on our end. I'll be following up with our engineers to make sure we get a permanent fix rolled out for this. -Chris

like image 24
fgro Avatar answered Sep 23 '22 20:09

fgro


This appears to just be a timeout from your push being too large.

I got around this by doing a git reset to a SHA that was around 500 commits back, pushing that, and then pushing the rest of my repo.

like image 30
ignu Avatar answered Sep 24 '22 20:09

ignu