Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
241 views
in Technique[技术] by (71.8m points)

node.js - How to stop using up free dynos on Heroku

Most answers I've found here are a couple years old and thus the services on Heroku.com barely match with the answers here as things keep changing and it's driving me nuts.

I looked up and researched but all of them don't seem to work and looks like I'm not the only one having this issue.
How to stop an app on Heroku?
How to stop a heroku server?
Heroku dyno keeps rebooting constantly

I did turn on maintenance mode with heroku maintenance:on and web to 0 with heroku ps:scale web=0 as described here but my app still keeps using up my free dynos. My app's resources are also off (I use to run the node worker)
My Procfile: Worker: node myapp.js

Despite all settings made above my used up dynos still keep increasing daily even though it says No dynos on myapp. I always check it via CLI:

$ heroku ps -a myapp
Free dyno hours quota remaining this month: 36h 13m (6%)
Free dyno usage for this app: 513h 46m (93%)
For more information on dyno sleeping and how to upgrade, see:
https://devcenter.heroku.com/articles/dyno-sleeping

No dynos on ? myapp

I am also aware that dynos automatically restart when following things happen as written here:

- create a new release by deploying new code
- change your config vars
- change your add-ons
- run heroku restart

But none of these apply as I never changed my code or vars from the day I've been trying to "stop" the app.

Any help is very appreciated!

question from:https://stackoverflow.com/questions/65845557/how-to-stop-using-up-free-dynos-on-heroku

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Like I said in the comments, it's been fixed for some reason after a while but I didn't do anything different than before except that I've changed maintenance mode through the website - not via CLI. I performed the following changes.

  • Turn on maintenance mode through website
  • Entered this in the CLI: heroku ps:scale web=0 -a myapp
  • Resources are all offline

I provided these settings in case people got similar issues.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...