Search code examples
strapi

Strapi with Heroku keeps doing new 403 errors and deleting collections


I have a very annoying issue and I'm not sure what's happening here:

When I create a new project with new routes and I make them available for public , everything is going well. However after some time (today, one hour maybe), I get a {statusCode: 403, error: "Forbidden", message: "Forbidden"} for all my routes and I need to 1) Recreate a new admin user and b) Recreate all entries in my Database's collection.

The CMS is hosted with heroku but I don't think this is related to the issue.

Any help will be very appreciated.


Solution

  • I'm pretty sure you are used the --quickstart flag when you created your application.

    So the database that is setup is a SQLite database. So your database is a file in your application.

    Heroku doesn't support files update. Here is the doc that will help you to understand - https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted

    I suggest you to move on another database like PG MySQL or MongoDB. There is some free plan for these databases.