How to protect a free serverless database tier
Free database tier abuse keeps billing long after the signup. What silent databases cost, which basic checks break and which fixes lower the bill.
You changed the filter from 30 days to 90, hoping the number would collapse, and it only fell from 18,700 to 16,500. Those are free databases on your platform with no connection in three months. You weren't even looking for them. A paying customer wrote in this morning, and you opened the admin tool expecting to find one slow node.
"Every Sunday night our API times out waiting for the database to wake up," they wrote. "Four weeks running now. Is this normal on the team plan?" Their database is running a full pg_dump as you read this, and you know what that usually means.
This is a scenario, with numbers you can swap for your own, and free database tier abuse doesn't look like much until you add it up. You run maintenance on Sunday nights, in a six-hour window, since that's when traffic is lowest. Every database gets woken for 90 seconds of backup verification and patching, including the ones nobody has opened since spring.
18,700 databases x 90 seconds = 467.5 compute hours
467.5 hours / 6-hour window = about 78 slots, all night
78 + your normal night of 60 = 138 slots wanted
Your warm pool = 120 slotsSo for six hours a week you're 18 slots short, and the customer who pays you waits behind rows that have been silent for a year. Now price those rows. These costs are assumptions, so replace them. A silent free database holds about 0.4 GB:
- Storage, 0.4 GB x 3 copies x $0.10 per GB-month: $0.12
- Restore history and snapshots: $0.03
- Wake-ups, about 6.5 minutes a month at $0.46 an hour: $0.05
- Pooler slot, monitoring and metadata: $0.02
- Total: $0.22 per database, every month
Twenty-two cents is why this got so far. Your free tier has been open for 18 months, and about 1,100 new databases a month go quiet within a week of being created. That's $242 more on the bill every month, and last month's $242 never goes away.
- Today: 18,700 x $0.22 = $4,114 a month
- Paid so far: $242 x (0 + 1 + 2 ... + 17, which is 153) = $37,026
You have 480 paying accounts averaging $29, so $13,920 a month comes in, and silent databases take about 30 cents of every dollar. At a net burn of $26,000 a month, the $37,026 you've already paid is about six weeks of runway. If you closed signups this minute, you'd still owe $4,114 next month and the month after, $49,368 a year, for rows nobody reads.
Some of those rows are extra accounts, and some are honest developers who tried you once. The table can't say how many of each, and you still have to decide something this week. Delete them and you may wipe a side project whose owner comes back in March and posts about it. Keep them and you keep paying. Or cut the free tier from 1 GB to 200 MB and take away the reason developers picked you. While you think about it, the pg_dump finishes. That's a $149 team plan, $1,788 a year.
That was the slow kind of expensive, and it's made up. This one was real and took one night:
From our early beta
A team whose cloud bill normally ran $200 to $300 a month woke up to a $12,000 bill. Automated registrations had triggered thousands of expensive serverless functions, database operations and background jobs overnight.
That bill is 40 to 60 times a normal month. A database product carries the same exposure if signing up is what provisions the storage.
Why free database tier abuse outlasts the signup
Most free benefits end when they're used. A free model credit gets spent, and a free compute job finishes. A database starts costing you when it's created and keeps costing you until somebody deletes it, and the person who created it has no reason to, because leaving is free.
The extra accounts behind it are usually dull. A freelancer gives each client prototype its own free account. A developer with eight side projects meets a plan that allows one database. Each of those accounts is under every limit you set, and each one leaves a database behind.
An illustrative life of one database, at $0.22 a month:
The obvious fix is a job that deletes anything idle for 90 days. It'd clear 16,500 rows tonight. It would also destroy data you can't restore, it can't tell a project that's quiet until spring from an extra account, and next month 1,100 more databases arrive anyway.
Lower the cost of the databases you already have
Start here, because these steps hold up whoever created the database.
Count them and price them. Run this on your control plane, then price one database the way the list above does.
select count(*) as silent_free_databases
from databases
where plan = 'free'
and last_connected_at < now() - interval '30 days';Stop provisioning at signup. Create storage when someone verifies their email and asks for a database, so an account that never comes back holds no disk. See how to stop expensive work running on unverified signups.
Give free databases their own pool, so a free tenant's wake-up can never take a slot from someone who pays. This is the step that answers the Sunday message.
Spread maintenance across the week. 467.5 hours over 168 hours is about 2.8 slots, down from 78.
Archive, then delete on a published schedule. After 30 idle days, stop maintenance, drop the replicas, keep one copy in object storage and email the owner. Restore it on the next connection. Delete only after the notice period your terms state.
At $0.02 per GB-month for object storage, one archived database costs 0.4 x $0.02 = $0.008, plus the $0.02 of metadata, so $0.028. Across 18,700 databases that's about $524 a month instead of $4,114, and no honest developer lost any data.
It doesn't touch the reason the pile grows, though. The next 1,100 still get created, and an extra account that stays in use keeps its full 1 GB.
The basic signup checks, and how each one breaks here
What you'd like to know at signup is whether this developer already has a free database. Every basic check tries to answer that with something smaller. Email is the clearest case: Gmail ignores dots and plus-tagged mail reaches the same inbox, so one mailbox can look like many.
| Basic check | What it catches | What it misses | Who it wrongly blocks | What it costs to keep working |
|---|---|---|---|---|
| Email verification | Typos and dead addresses | Any second real inbox | Developers whose code lands in spam | Deliverability work |
| Unique emails | The same address twice | Every different address | Almost nobody | Very little |
| Disposable-domain blocks | Known throwaway services | New domains, ordinary mailboxes | People using privacy forwarding | A list someone updates forever |
| Gmail dots and plus addressing | One inbox written several ways | A second real mailbox | People who sort their mail with plus addresses | Upkeep as mail services change |
| CAPTCHA | Simple scripts | People signing up by hand | Screen reader users, developers' own coding agents | Fees and lost signups |
| Phone requirement | Casual second accounts | Anyone with another number | Developers without a reliable mobile number | A charge for every text |
| Card requirement | Casual second accounts | Anyone with another card | Students and weekend builders | Fewer signups, on a tier you advertise as free |
The network rules hurt more here, because your customers are developers. One signup per IP address stops repeats from one connection and misses every other connection, and it lands on coworking spaces, university labs and whole companies behind one gateway. VPN blocks catch known ranges and miss everything off your list, and plenty of engineers work behind a company VPN. Both need an exceptions list somebody keeps up.
The rules on the database itself have their own gaps. Rate limits on the create-database endpoint stop bursts and slow busy deploy pipelines, need tuning, and never see an account that creates one database and stops. Usage caps hold each account to its allowance and stop honest projects at the limit, but each extra account arrives with a new one, and a silent database never trips a cap. Expiring free databases after 30 days does shrink the pile, and it removes the reason anyone builds on you.
At one minute a row, manual review of the 18,700 you have is about 312 hours, and the next 1,100 add 18 hours every month. The reviewer gets a name and an empty schema, and a tired guess can delete a real project.
Stack all of it, and someone who wanted a connection string in 30 seconds has to confirm an email, solve a puzzle, type a phone number and enter a card. Every list and exception is also yours to maintain.
Before the next free database is provisioned
Look at what just broke. The email rules ended at a second inbox, the IP rule landed on a whole office, the CAPTCHA turned away a coding agent someone set up on purpose, and the caps never fired. You don't have to build your own abuse prevention system to replace them. AbuseZero was built for the moment a free database is claimed. It flags abuse that single checks miss and detects linked claims, with multi-layer AI risk analysis examining 140,000+ signals. You also get a proprietary algorithm, with AI that checks the claim again. A one-per-IP rule has one address to go on, while AbuseZero sees beyond an IP address with VPN, hosting, network reputation, Tor and proxy intelligence. It checks mailbox aliases, disposable domains and mail routing, and it recognizes repeat devices across new accounts, even when email addresses keep changing. It blocks spammy bots, browser automation and malicious scripts while allowing genuine AI agents and assistants, and creating a fresh account isn't enough to erase previous activity.
Your server makes one API call before it provisions the database and gets a clear allow or deny, under rules you control. Observe mode shows you what would be denied before anyone is blocked. Your control plane still provisions, caps and archives. The quickstart protects your first benefit.
Frequently asked questions
What is free database tier abuse?
It's opening extra accounts to collect more free databases than you meant to give. It costs more than it looks, because a database bills you every month until it's deleted.
Does scale to zero fix the cost of idle free databases?
It removes idle compute. Everything in the $0.22 above still costs you after a database has scaled to zero.
Should I delete idle free databases?
Archive first and delete later, on a schedule your terms state. A deleted side project can't come back.
Is every developer with two accounts abusing the free tier?
No. Work and personal accounts are normal, and clients sometimes need to own their own. Decide what you mean to give, and write it down.
How do I keep extra accounts from getting a free database?
Provision on first use, keep the basics that suit your developers and evaluate the claim when the database is requested. AbuseZero's evaluation returns allow or deny at that point.
Keep the free tier your developers came for
Start with Builder
Pay as you go. Evaluate your first free database claim today.
See pricing
Builder, Pro, Scale and Enterprise.
Talk to us about Enterprise
High volumes and custom terms.