N
Neonβ€’2w ago
xenial-black

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
adverse-sapphire
adverse-sapphireβ€’2w 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! πŸ™‚
xenial-black
xenial-blackOPβ€’2w ago
Hello!, I have just 1 branch but still this doesn't make sense
adverse-sapphire
adverse-sapphireβ€’2w ago
Is the database called on every site view (e.g., landing page)? If so, it could be due to bots triggering site views?
xenial-black
xenial-blackOPβ€’2w ago
maybe ahrefs crawlers?
adverse-sapphire
adverse-sapphireβ€’2w ago
Can you share your Branch > Monitoring > CPU graph?
xenial-black
xenial-blackOPβ€’2w ago
sure!
adverse-sapphire
adverse-sapphireβ€’2w ago
This should tell us how often your database is triggered or if it's even just always on due to frequent requests.
xenial-black
xenial-blackOPβ€’2w ago
No description
xenial-black
xenial-blackOPβ€’2w ago
from vercel:
No description
xenial-black
xenial-blackOPβ€’2w ago
even if I'm doing something wrong, vercel functions will die after 10 sec, if i'm not wrong
adverse-sapphire
adverse-sapphireβ€’2w ago
How many CPUs do you have configured for your database? Branch > Overview > Compute > Edit
xenial-black
xenial-blackOPβ€’2w ago
just the free tier
adverse-sapphire
adverse-sapphireβ€’2w ago
Could you check what the scaling confugration looks like?
xenial-black
xenial-blackOPβ€’2w ago
this?
No description
adverse-sapphire
adverse-sapphireβ€’2w 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.
xenial-black
xenial-blackOPβ€’2w ago
np
adverse-sapphire
adverse-sapphireβ€’2w 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.
xenial-black
xenial-blackOPβ€’2w ago
could it be dev time?
adverse-sapphire
adverse-sapphireβ€’2w ago
Probably dev time + bots crawling your landing page and triggering a DB startup + actual users?
xenial-black
xenial-blackOPβ€’2w ago
i see i've been like a slave also had 2 ahrefs audits
adverse-sapphire
adverse-sapphireβ€’2w 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)
xenial-black
xenial-blackOPβ€’2w 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
adverse-sapphire
adverse-sapphireβ€’2w ago
No need to apologize! Hope I was able to help a bit πŸ™

Did you find this page helpful?