Reducing costs

Hello everyone! I dont understand how the $5 trial works, like how the credit is spent… I am seeing that my database uses 10GB and I would like to reduce that maybe but don’t know how…
I will appreciate for the help! Also, ones the month ends the $5 ends? Or how does it work?

Hi,

Hopefully this paragraph should answer those questions:

It sounds like you have now exceeded the free allowance since you say the database is 10GB … but you only get 3GB of storage for free. So that will start to deplete that $5 of credit. When it drops to zero, you are moved to the $5/month Hobby Plan.

If you have 10GB of data in your database … not much you can do. You can’t exactly delete 7GB of your user’s data :slight_smile:

However if you have a 10GB volume for your database to use but are only using, say, 10 MB of data within that volume for your database, you might want to delete that database (having made a backup etc!) and create a new database. When asked how big its volume should be, perhaps choose 1GB. Since 1GB would be under the 3GB free allowance and give you longer to use up your free $5 of credit.

Of course that doesn’t take into account other resources you may be using (VMs, bandwidth etc). Those will also deplete the $5 of credit over time.

1 Like

The thing is the user even started filling up the database, I don’t understand how I got to 10GB in the first place… It is a ruby on rails app. I don’t care deleting the database and doing it again, but wouldn’t know how to change the size of it, any ideas?

How can I delete it and create a new one???

Thanks for the help!!!

Hi,

Ah, if you have 10GB of data within the database, there would be no point deleting it, since you would then simply make a new database … which would then get another 10GB of user data (by the sounds of it).

I assume you are using a Fly-provided postgres and followed the instructions on e.g this page:

Perhaps you picked 10GB, or perhaps it picked that for you. Not sure. Either way, that section of the site is your go-to for how to do X to a Postgres app e.g create/delete etc.

But whatever you do, 10GB > 3GB (free allowance), and so you are going to have to pay Fly (eventually).

Your other option would be to use a different service for your Postgres database, as it sounds like that is your point of concern as regards cost :thinking:. Popular ones are neon.tech (but their free tier wouldn’t include 10GB, I don’t think).

Or there is xata.io

You would then use Fly’s VMs for your app, and [other service] for your database.

But of course that adds other complications like how to whitelist access to your database from Fly. Which … you can’t.

But do you think I could not create the database with 10GB? Choosing less when creating it?

Seems there are not many options for me :frowning:

They have changed the CLI since I last used it (back then it asked you for the volume size when creating a new database, and you would type in a number) but based on that page linked above it looks like you can still do it:

During this process, you get to choose from several preset resource configurations for the app:

? Select configuration:  [Use arrows to move, type to filter]
> Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk
  Production (High Availability) - 3 nodes, 2x shared CPUs, 4GB RAM, 40GB disk
  Production (High Availability) - 3 nodes, 4x shared CPUs, 8GB RAM, 80GB disk
  Specify custom configuration

I would guess if you pick that last option it would then ask you for the size of the disk you want.

Do you think I can shoose the first one? It sais “development”, can I choose that one for production anyways?

Sure, you can do that.

You probably shouldn’t (e.g no HA, it may auto turn itself off etc) but as long as you are aware of why it’s cheap, its up to you.

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