Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

server - I have a serious discord bot on Heroku that should not stop but after 1 day it did a full reset

hi guys so I have a bot in discord which constantly adds data to an excel file but after a full day that we deployed on Heroku it did a full reset the excel file and the bot, but in Heroku there's nothing wrong, I payed the 7$/hobby plan which is described "never sleeps" can someone help me solve the issue ? it's an emergency for me I would highly appreciate if someone solves


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

1 Answer

0 votes
by (71.8m points)

Heroku file system is ephemeral, meaning Dyno applications can write on the file system but changes are discared when the Dyno restarts.
Dynos restart every 24hrs, even the ones you pay for, so local changes never last.

You must use an external storage: Amazone S3, FTP hosting, Dropbox, etc...

If you are looking for free file storage options I have create a Github repo with some info and references.
There are several alternatives that offer a free tier (limited space) and can be accessed securely (token or credentials) via an API:

  • Github (simple, free, unlimited space, suitable for saving few files)
  • S3 (most popular, very cheap, suitable for small and very large volumes)
  • DriveHQ (free with limited space, FTP hosting)
  • Dropbox (free with limited space, great Web UI to manage your files)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...