Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heroku repo:gc --app APP_NAME results in curl error #89

Closed
FurkanToprak opened this issue Jan 13, 2021 · 4 comments
Closed

heroku repo:gc --app APP_NAME results in curl error #89

FurkanToprak opened this issue Jan 13, 2021 · 4 comments

Comments

@FurkanToprak
Copy link

FurkanToprak commented Jan 13, 2021

I'm having an error when trying to reduce my slug size with

heroku repo:gc --app your-app-name
heroku repo:purge_cache --app your-app-name

Below is my trace.

heroku repo:gc --app smarta-bot
Running set -e
Running set -e
Running set -e
Running set -e
mkdir -p tmp/repo_tmp/unpack
cd tmp/repo_tmp
curl -fo repo.tgz 'https://s3-external-1.amazonaws.com/heroku_repos/heroku.com/197701344.tgz?AWSAccessKeyId=AKIAIO4SD3DCRO7W6IJQ&Signature=Ak1XvYSVY2E0lEFTmpdpBtguUDY%3D&Expires=1610499926'
cd unpack
tar -zxf ../repo.tgz
git gc --aggressive
tar -zcf ../repack.tgz .
curl -fo /dev/null --upload-file ../repack.tgz 'https://s3-external-1.amazonaws.com/heroku_repos/heroku.com/197701344.tgz?AWSAccessKeyId=AKIAIO4SD3DCRO7W6IJQ&Signature=XZg%2FN0bZjW8%2BiroI7C5p1R8GOCY%3D&Expires=1610499926'
exit on ⬢ smarta-bot... up, run.8862 (Free)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found

I apologize in advance if this issue is in the wrong repository, and would greatly appreciate it if you could lead me to the correct one.

@edmorley
Copy link
Member

@FurkanToprak Hi! Resetting the Git repo won't affect your slug size (many many years ago the build cache used to be stored in the Git repo, but is not any more). The error above means that your Git repo was already reset (or never used, eg due to using GitHub sync instead).

The correct way to clear your build cache (which may possibly help with slug size), is documented here:
https://devcenter.heroku.com/articles/slug-compiler#build-cache
https://help.heroku.com/18PI5RSY/how-do-i-clear-the-build-cache

The above docs are linked from the slug size docs here:
https://devcenter.heroku.com/articles/slug-compiler#slug-size
https://help.heroku.com/KUFMEES1/my-slug-size-is-too-large-how-can-i-make-it-smaller

I don't suppose you could link to where you saw repo:gc being mentioned? If there are stale docs elsewhere, I'd like to update them :-)

@edmorley
Copy link
Member

Closing since the confusing error message of heroku repo:gc is a dupe of heroku/heroku-repo#96.

@FurkanToprak
Copy link
Author

Sorry for the duplicate issue. The advice was from a third-party:
https://thoughtbot.com/blog/how-to-reduce-a-large-heroku-compiled-slug-size

@edmorley
Copy link
Member

No problem! Thank you for that link :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants