SupabaseS
Supabase3w ago
A

Supabase client becomes unresponsive after some time

Hi Supabase support team,

I'm using Supabase in my project and I've run into an issue where the Supabase client becomes stale or unresponsive after it has been created for a while.

I initialize the Supabase client in a lib/supabase.ts file that I created to manage all Supabase operations in my React project. This client is then imported and used across various components. It works fine initially, but after some time, when I try to invoke a Supabase function through that shared client, it no longer responds—there are no errors and no returned values. It simply hangs.

I'm not sure if this behavior is expected or if I'm using the client incorrectly. As a workaround, I’ve tried using a JavaScript Proxy to create a new Supabase client instance each time I make a request, but this feels like an odd solution.

Could you please advise on the correct way to use the Supabase client so it doesn't become stale or hang like this?

Thank you!
Was this page helpful?