Images get lost after few minutes of inactivity in server. It works fine in development.

I am very new to and have been testing it out using the free plan since yesterday. The image is uploaded with ActiveStorage in the Rails app. After deployment, the images get lost within a few minutes of inactivity on the server. However, there’s no problem in dev. environment.

Also, I tried creating a volume with the command fly volumes create myapp_data --region ord --size 1 but it throws the following error:

Error: failed creating volume: failed to create volume: To create more than 1GB in volumes please add a payment method.

Can someone help me please?

Hi @SamC

There’s no persistent storage on a Machine without a volume. And if you have auto stop activated in your fly.toml file, then Machines will stop when there’s no traffic to the app.

Here’s some info about setting up ActiveStorage with a volume: Active storage images are not persisting in disk

You might need to add a credit card for verification to create more apps and volumes. You won’t be charged if you don’t go beyond the free allowance. Answered that question here: Error failed creating volume: To create more than 1GB in volumes please add a payment method - #7 by SamC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.