Realtime stopped working after tenant cleanup – TenantNotFound?
My Supabase project is suddenly throwing TenantNotFound errors non-stop in the logs and Realtime is completely dead. I’m on a tight deadline and really need a fix, so any help or ideas would be massively appreciated.
Here’s what’s happening: - Project works normally after initial deployment - After a period of inactivity, I see this in logs:
Tenant qwnszhqhhscwkknnhqxx has been terminated: :shutdown Tenant has no connected users, database connection will be terminated
Tenant qwnszhqhhscwkknnhqxx has been terminated: :shutdown Tenant has no connected users, database connection will be terminated
- Twelve minutes later, Realtime tries to reconnect, but all I get is:
TenantNotFound: Tenant not found: qwnszhqhhscwkknnhqxx TenantNotFound: Tenant not found: qwnszhqhhscwkknnhqxx ...
TenantNotFound: Tenant not found: qwnszhqhhscwkknnhqxx TenantNotFound: Tenant not found: qwnszhqhhscwkknnhqxx ...
- This error repeats 96 times in a few minutes. Nothing else works. - Mixed in are 422 UnprocessableEntity errors like:
"UnprocessableEntity: %{messages: [\"is invalid\"]}" Sent 422 in 23ms
"UnprocessableEntity: %{messages: [\"is invalid\"]}" Sent 422 in 23ms
- I recreated the Supabase instance from scratch - Checked all publications - both
supabase_realtime
supabase_realtime
and
supabase_realtime_messages_publication
supabase_realtime_messages_publication
show as present and valid in the dashboard - Verified correct project ID - Submitted a support request, but on the free plan so not sure how soon I’ll get a response
- The error usually pops up right after Supabase terminates the tenant for “no connected users” (idle state) - After termination, even recreating the project eventually leads back to the same problem. Realtime totally fails to reconnect and tenant can’t be found by Supabase’s backend - Realtime service just spams TenantNotFound error for every subscription - Connecting from a JS client (For testing) but also Swift
Would really appreciate any advice, workarounds, or just visibility from the team/community. Hit this roadblock right before a deadline and not sure what else to try. Thanks a ton for any help!
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.