S
Supabase2mo ago
Andrew

Project randomly 503's after removing spending cap

I have a Pro project that had a spending cap of $25 on it. I noticed my app requests were timing out with context exceeded deadlines so I removed the spend cap. After restarting the database I'm still getting 503 Service Unavailable responses about 50% of the time. Is there a way to force refresh my project to abide by the new unlimited spending cap?
36 Replies
garyaustin
garyaustin2mo ago
Removing spending cap does not increase your CPU/memory/Disk I/O IF those are causing the timeout. You have to upgrade your CPU
Andrew
AndrewOP2mo ago
It's odd because I wasn't running into any limits before hitting the spend cap
garyaustin
garyaustin2mo ago
What spending cap was being hit?
Andrew
AndrewOP2mo ago
I had the default PRO $25 limit on I added another staging db to the project on a micro instance which put it over based on compute time
garyaustin
garyaustin2mo ago
compute time is not regulated by spending cap
Andrew
AndrewOP2mo ago
For having a database running, it adds compute time hourly Unfortunately when you remove the spend cap, it removes the existing usage stats otherwise I'd drop them here
garyaustin
garyaustin2mo ago
No. Each instance/project is its own CPU/memory/DiskIO Only egress, database size type things are shared.
Andrew
AndrewOP2mo ago
Yes, and I have 2 projects on a pro plan. With the second one added, it put me at 25.90$ in total spend because of the Compute Hours
garyaustin
garyaustin2mo ago
When you add compute it is a monthly billing. For each project separately.
Andrew
AndrewOP2mo ago
Pro projects come with a default spend cap of 25$ and when it was over that it limited my interactions with my instances. After I removed the cap, I'm still intermittedly getting hit with those service limits
garyaustin
garyaustin2mo ago
Compute size is per project and is not bound by the spending cap.
Andrew
AndrewOP2mo ago
I think we're talking about different things here Let me add a bit more context
garyaustin
garyaustin2mo ago
The spend cap is ONLY for egress/db size/storage/realtime overage. Each project/instance CPU is a fixed billing per month. If you add a 2nd project it goes to $35 regardless of spending cap.
Andrew
AndrewOP2mo ago
That makes sense It does not make sense when I'm being hit with 503's
garyaustin
garyaustin2mo ago
That is not likely related to the spending cap.
Andrew
AndrewOP2mo ago
Would egress from the instance not count in limiting it?
garyaustin
garyaustin2mo ago
Unless you see in the dashboard some overage. egress would be shared.
Andrew
AndrewOP2mo ago
So if I'm over my spend cap, and I make a call that tries to use egress, what happens?
garyaustin
garyaustin2mo ago
You will see a warning in the dashboard, or usage settings you are over egress. But there is usually grace.
Andrew
AndrewOP2mo ago
Right, I had $0.90 in grace
garyaustin
garyaustin2mo ago
Is your egress over?
Andrew
AndrewOP2mo ago
I can't see that anymore because it resets usage when you remove the spend cap
garyaustin
garyaustin2mo ago
If you removed the spend cap then egress should not cause 503. I'm skeptical your issue is egress for a 503. Timeouts are usually CPU/memory Disk I/O or instance crash related. I also recommend you put in a support request as no on here can see your instance or fix if bugged.
Andrew
AndrewOP2mo ago
Here's what makes me think my service limitations are related to spend I had a cap of $25 set by default. I started to receive service timeouts and 503 near the top of an hour. I checked my dashboard and it stated I had $25.90 in spend for the period. I removed the spend cap and it reset my current cost to $25 flat and my requests start working 50% of the time. With the rest being 503'ed My hunch is that my requests are being served from distributed servers that have cached data on the status of my account and if I should be limited. This cache is currently incorrect as I removed the limitations on my account
garyaustin
garyaustin2mo ago
I think the spend cap is a red herring.
Andrew
AndrewOP2mo ago
I disagree It's the only change on my account
garyaustin
garyaustin2mo ago
Then contact support. No users here can help if we can't narrow down the 503 cause. I've never heard of spend cap or egress causing 503. Are you seeing Postgres timeout errors in the logs?
Andrew
AndrewOP2mo ago
Let me check I upgraded the instance to narrow that down too Postgres is fine logs wise, PostgREST has a significant number of the following
"Failed to query the PostgreSQL version. {\"code\":\"PGRST000\",\"details\":\"connection to server at \\\"localhost\\\" (::1), port 5432 failed: Connection refused\\n\\tIs the server running on that host and accepting TCP/IP connections?\\nconnection to server at \\\"localhost\\\" (127.0.0.1), port 5432 failed: Connection refused\\n\\tIs the server running on that host and accepting TCP/IP connections?\\n\",\"hint\":null,\"message\":\"Database connection error. Retrying the connection.\"}"
"Failed to query the PostgreSQL version. {\"code\":\"PGRST000\",\"details\":\"connection to server at \\\"localhost\\\" (::1), port 5432 failed: Connection refused\\n\\tIs the server running on that host and accepting TCP/IP connections?\\nconnection to server at \\\"localhost\\\" (127.0.0.1), port 5432 failed: Connection refused\\n\\tIs the server running on that host and accepting TCP/IP connections?\\n\",\"hint\":null,\"message\":\"Database connection error. Retrying the connection.\"}"
garyaustin
garyaustin2mo ago
If you look on main project page is status all green? If you upgraded the instance that would also include a restart so won't ask about that.
Andrew
AndrewOP2mo ago
No description
garyaustin
garyaustin2mo ago
And do you already have a support request in?
Andrew
AndrewOP2mo ago
Not yet
garyaustin
garyaustin2mo ago
Please do that as that last error does not seem good.
Andrew
AndrewOP2mo ago
Issue persists with instance upgrade too
garyaustin
garyaustin2mo ago
Yeah, that is my restart mention. That would be the next step but upgrade does that.
Andrew
AndrewOP2mo ago
I did try that a few times with the MICRO instance too and no dice I appreciate the help

Did you find this page helpful?