Strapi project resets on heroku every couple of hours (dyno restarts)

The same happened on my project yesterday.

  • Production env only
  • Postgres hosted at Heroku
  • Strapi hosted at Heroku
  • No environments or database config folders/subfolders
  • The issue happened with Strapi V4.5.5, then I updated it to V4.13.6 and it is still happening

The first time it happened I was just adding the first couple data entries in Strapi admin and then it was empty on my next login. I thought I had deleted it by mistake and added a ton of data after that.
The next day, several fields where empty and I was facing lots of errors on frontend due to no data being served.

I couldn’t track what is ‘erasing’ the data, but it seems like when you deploy and update or does any changes on Content-Type Builder and it restarts the application, Strapi simple loses the last row of data added to the database.
It seems to be time related too (I am just guessing, I have no proofs), like, if you deploy or update a content-type with more fields right now, you loose your last 30 minute of data (it’s just an example, I dunno what would be that time window exactly).

I am pretty sure that my configurations are correct. If I found the origin of the issue I’ll be glad to share the cause and a fix.

1 Like