Last week, a developer friend of mine reached out with a problem that most indie hackers would kill for, but is actually a nightmare when you're in the middle of it, (literally lol).
He had built a fairly simple SaaS, a tool for managing local sports leagues. He used Supabase because it’s the default choice for anyone building with Next.js these days. It’s fast, the documentation is great, and you don't have to worry about managing a Postgres instance yourself.
He did a soft launch. No massive social media campaign, just some local outreach and a post in a few niche forums. Within 48 hours, he hit his first 1,000 active users, and this was insane, even i didnt hit 1000 users in 48 hours(on supabase free tier , this is something).
Then the "ghost bugs" started.
He messaged me on Wednesday afternoon. Users were starting to complain that the app was slow, but when he checked his Vercel logs, everything looked fine. His Supabase dashboard showed some spikes in CPU, but nothing that suggested a total system failure.
But for a significant chunk of his users, the "Leagues" dashboard was just... empty. No error message. No "Try again later." Just a loading spinner that eventually timed out into nothingness(white screen of death as i like to call it ).
He couldn't reproduce it on his own machine cos it worked. typical "it works on my machine" vibe
We spent the evening digging into it. It wasn't a code bug in his React components. It wasn't a logic error in his RLS (Row Level Security) policies.
It was Connection Pool Exhaustion.
When you're starting out with Supabase, it’s easy to use the direct connection string. But as your traffic grows, every visitor who lands on your site opens a direct connection to PostgreSQL. Databases have a finite number of connection slots. Once they are full, the database starts dropping new requests.
Because his app was using standard async/await calls in the frontend, the browser was waiting for a response that the Supabase gateway was never sending. The requests were timing out before they even reached his application logic.
To his monitoring tools, it looked like a "slow network." To his users, the app was broken.
Why Traditional Logs Fail During Scaling
Here is the hard truth about building on a "BaaS" (Backend-as-a-Service): You are often blind to the infra-level failures.
If your database is too busy to accept a connection, your server-side logs won't show anything because the request never made it to your server! It's a "Silent 500" a failure at the gateway level that leaves no trace in your application logs.
If you don't have Client-Side Visibility, you have no idea why your users are leaving.
Moving Beyond "Soft Launches"
My friend had made the mistake of assuming that "Serverless" meant "Infinite." But every database even a managed one like Supabase has physical limits.
We fixed it by doing two things:
- Switching to the Supabase connection pooler (Supavisor).
- Adding a client-side "Safety Net" to track what users were actually seeing.
He didn't want a complex observability platform. He's a solo founder; he doesn't have time to stare at Grafana charts all day. He just wanted to know the second a database query failed.
We added BugMail to his project. It took about 60 seconds to drop into his layout.tsx.
Now, instead of guessing why a user is seeing an empty dashboard, he gets an email with the exact Postgres error code.
here is the setup we used to ensure he never ships blind again:
-
Auth Context: We used BugMail's
setUserinside the SupabaseonAuthStateChangelistener. If an error happens, we know exactly which user is affected. -
Query Errors: Every call to
supabase.from()now checks theerrorobject and reports it to BugMail. This captures the "Gateway Timeouts" and "Rate Limits" that standard logs miss. - User Breadcrumbs: We track the user's journey. "User clicked 'View Stats'" → "Supabase Query Started" → "Error: Pool Exhausted".
then on friday (literally just 2 days after ), we caught a weird RLS mismatch that only happened for users in specific time zones. We saw it in the BugMail dashboard within minutes of it happening. We fixed it before the user even had time to send a support email.
The Lesson for Every Builder
If you're building with Supabase, don't wait for your friends to tell you your app is broken. Databases are physical things, and "Serverless" is just someone else's server.
Infrastructure fails. Your job is to make sure you hear the failure before your users do.
I wrote a massive, high-depth technical guide on the exact technical setup we used to monitor Supabase accurately here: The Complete Guide to Supabase Production Monitoring
Stop guessing. Start monitoring.
I’m building BugMail to help indie hackers scale without fear. Follow the journey at bugmail.site.
Top comments (0)