N
Neon4w ago
deep-jade

Is there any way setting compute hours to 0? Or does it reset automatically every day or month?

.
29 Replies
dependent-tan
dependent-tan4w ago
Hey! Compute hours are reset on the first of the month, every month. You can also upgrade to your Launch or Scale plan.
deep-jade
deep-jadeOP4w ago
alright thanks. how interaction with the database is called the compute hour?
dependent-tan
dependent-tan4w ago
I'm not sure I understand, are you asking why its called a compute hour?
deep-jade
deep-jadeOP4w ago
yeah what's the compute hour duration of staying connected with the database?
dependent-tan
dependent-tan4w ago
A CU (Compute Unit) is Neon's measure of compute size. It's basically how big was your database in vCPU, and for how long. Running a 0.25vCPU database for 4 hours will cost you 1CU, whereas running a 1vCPU database for 4 hours will cost you 4CU (it's vCPU * time)
deep-jade
deep-jadeOP4w ago
for 4 hours means? time taken per request for data transfer from the server?
dependent-tan
dependent-tan4w ago
No, how long the database was active for
deep-jade
deep-jadeOP4w ago
But I keep connected to the server 24/7
dependent-tan
dependent-tan4w ago
Neon has auto scaling, so much of that time is most likely spend inactive. What does your CPU over time graph in the monitoring tab look like look?
deep-jade
deep-jadeOP4w ago
Like I have my discord bot in python which connects to the database on startup
dependent-tan
dependent-tan4w ago
Yes, but a connection will not keep the database active, only traffic to the database
deep-jade
deep-jadeOP4w ago
it says no data to show in the time duration box I see only 26th sept and 27th sept
dependent-tan
dependent-tan4w ago
Can you change the window to last 24h?
deep-jade
deep-jadeOP4w ago
so doing what woul reduce my compute hours? yeah but its still no data to show cause I am unable to connect to the database since 2 days as it reached the limit and declines connection
dependent-tan
dependent-tan4w ago
As in you're out of CU? Do you have your database min size set to 0.25vCPU?
deep-jade
deep-jadeOP4w ago
No description
dependent-tan
dependent-tan4w ago
To reduce your compute hour usage you want to make sure that you haev your min CPU size set to 0.25, and you want to make sure you dont have any cron jobs or anything that constantly pulls out database out of inactivity
deep-jade
deep-jadeOP4w ago
I do have some jobs that call fetch data every 5 seconds and that's the main purpose of my database
dependent-tan
dependent-tan4w ago
Then you won't be able to make use of the Neon auto scaling, and will run out of compute every month around the 16th
deep-jade
deep-jadeOP4w ago
this month is the first time I got this issue i am using neon from 2-3years not 5 sec, I do 2fetches every 1 minute and 2fetches 30 seconds
dependent-tan
dependent-tan4w ago
If you hit your database in intervals of less than 5 minutes, you will keep your database on 24/7. You were most liketly not hitting your database as often before
deep-jade
deep-jadeOP4w ago
So I should give requests every 5 minutes of interval?
dependent-tan
dependent-tan4w ago
No, you'll still be keeping the database on 24/7 since it takes 5 minutes for scale to zero to hit.
deep-jade
deep-jadeOP3w ago
then? 10 minutes? @Sam its the first day of the month but the compute hours didn't reset yet.
dependent-tan
dependent-tan3w ago
They will reset, it just depends on your time zone. You can have a look at last months discussions : https://discord.com/channels/1176467419317940276/1411930663606816888 well it depends on your use case. When you're using Neon, you just want to avoid running cron jobs since it keeps the database on. But, if thats what your app requires, then you won't be able to make use of the scale-to-zero feature, and will run out of compute hours.
deep-jade
deep-jadeOP3w ago
its mid night + 48minutes nah its been midnight + 2hours
dependent-tan
dependent-tan3w ago
I believe we reset all quotas at the same time, and because you're in an earlier time zone it will reset further into the first of the month
deep-jade
deep-jadeOP3w ago
do you have any estimate like how many hours later it is gonna be reset? I am in Indian Standard time Asia/Kolkata GMT + 5:30
dependent-tan
dependent-tan3w ago
Hey! Has everything been reset alright?

Did you find this page helpful?