wrong usage time?
According to the stats, Neon shows I'm using almost 50 CU-hours in 10 days (since Aug 15), but the site is only getting around 25 daily visits. It's just a catalog with a couple of filters and no registered users yet.
I feel like 4.7 hours per day is too much, right? Could it be DEV time?
23 Replies
dependent-tanβ’2mo ago
Hey! Check all your database branches and their settings. On the free tier, every database should automatically scale-to-zero if not in use but if in use, you also want to make sure you aren't overprovisioning. Make sure to set the min CPU settings to 0.25 CU/h for hobby projects.
Anytime you query your database, the DB starts up and scales back to zero if not in use for 5 minutes (on the free tier). If you use 0.25 CPU for that, your CU/h will last 4 times as long as 1 CPU. π
Review your branches and their metrics on the branches pages and let me know if that helps or if you're still using too much CU! π
genetic-orangeOPβ’2mo ago
Hello!, I have just 1 branch but still this doesn't make sense
dependent-tanβ’2mo ago
Is the database called on every site view (e.g., landing page)? If so, it could be due to bots triggering site views?
genetic-orangeOPβ’2mo ago
maybe ahrefs crawlers?
dependent-tanβ’2mo ago
Can you share your Branch > Monitoring > CPU graph?
genetic-orangeOPβ’2mo ago
sure!
dependent-tanβ’2mo ago
This should tell us how often your database is triggered or if it's even just always on due to frequent requests.
genetic-orangeOPβ’2mo ago

genetic-orangeOPβ’2mo ago
from vercel:

genetic-orangeOPβ’2mo ago
even if I'm doing something wrong, vercel functions will die after 10 sec, if i'm not wrong
dependent-tanβ’2mo ago
How many CPUs do you have configured for your database?
Branch > Overview > Compute > Edit
genetic-orangeOPβ’2mo ago
just the free tier
dependent-tanβ’2mo ago
Could you check what the scaling confugration looks like?
genetic-orangeOPβ’2mo ago
this?

dependent-tanβ’2mo ago
Yes, looks good! Sorry, I could have also retrieved this from the CPU graph, it shows 0.25 CPU there also as the allocated CPUs.
genetic-orangeOPβ’2mo ago
np
dependent-tanβ’2mo ago
Looks good. You want to make sure you scale all the way down to 0.25 CPU because you never exceed this. But you also see that there are quite frequent requsts to the database. It looks like it's on more often than off.
genetic-orangeOPβ’2mo ago
could it be dev time?
dependent-tanβ’2mo ago
Probably dev time + bots crawling your landing page and triggering a DB startup + actual users?
genetic-orangeOPβ’2mo ago
i see i've been like a slave also had 2 ahrefs audits
dependent-tanβ’2mo ago
If you run your database 24/7 at 0.25 CPU (what you're using right now), that's: 0.14 * 0.25 * 24 * 7 * 31 = $182 max - there is always only one database running (not like with serverless functions) π
- $0.14 pricing for CU/h on Launch Plan
- 0.25 CPU only consumes a quarter CU per h
- 24 hours
- 7 days
- 31 days
(Only considering compute here not storage)
genetic-orangeOPβ’2mo ago
i'm sorry i was a bit confused with the pricing model, so i have to work on the db, it seems it has too much activity
dependent-tanβ’2mo ago
No need to apologize! Hope I was able to help a bit π