Varun
Varun

Reputation: 665

heroku application still referencing old files after push

I've been experiencing this very odd problem lately in Heroku.

I develop and test locally, then I push the changes to Heroku. Even though the files pushed have been changed (and Heroku does recognize it and push the new files), when I look at the exact webpage on Heroku, it behaves as though it was still using the old version of the file that I just pushed.

When I see the HTML source in firebug, I can actually confirm that the old file is being used. I've tried using git push -f to "force" the git push, but no luck

any ideas??

Upvotes: 9

Views: 5838

Answers (3)

KamajiiSC
KamajiiSC

Reputation: 39

I know this is old, but I just recently had this problem, turned out it was just my cache. If you hit ctrl + F5 it hard refreshes the page and the cache. Worked in my case after searching everywhere.

Upvotes: 3

dulerong
dulerong

Reputation: 289

Experienced same problem too, so checked the repo files by running heroku git:clone -a my-app cloned the files currently in heroku master, and confirmed that the files in repo are the updated version. Hence, the newer files are uploaded correctly but is not being reflected by heroku. Hence I ran heroku restart and waited a long time, like 3 or 4 hours, and problem solved, heroku started running the new files.

Not exactly sure if heroku restart or simply waiting for 4 hours solved the problem, and I doubt I needed to wait 4 hours for heroku to reflect newer repo.

However, I think, after deploying to the same master branch git push heroku master, heroku needs some time to reflect the newer files, hence the switch to newer files will not be instant, it takes time.

Hope this helps anyone else experiencing the same problem.

Upvotes: 0

tfe
tfe

Reputation: 34972

Try heroku restart to force a restart of all the dynos. I'm not positive but I've seen indications like this that they tend to "lazy restart" the dynos and workers after a push. If you want to guarantee all workers and dynos are working off the latest pushed code, do a restart after your push.

Upvotes: 13

Related Questions