You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have self-hosted Supabase on a machine with 2 cores and 8GB of RAM. Recently, we've encountered occasional 500 errors with Supabase, where supabase-py fails to fetch data from the Supabase database, returning a 500 error. The issue is difficult to reproduce, but here are the steps we've tried:
We checked the Docker logs but found no 500-related errors.
We reviewed Supabase's analytics but found it unusable (we referred to the relevant GitHub issue, but it's still not working).
We suspect the issue might be due to a small connection pool, preventing new instances from connecting. However, we're not sure how to modify the connection pool size on a self-hosted Supabase.
We checked the Nginx logs and found records of failed requests, but we’re unsure how to resolve this.
We also looked into the official Supabase Next.js documentation and noticed the same pattern, where createClient is used directly within different page.jsx files. After briefly reviewing the supabase-js code, we found that a Postgres connection object is created. In more complex projects, where many instances of the Supabase object are created, could this be causing the connection pool to be insufficient?
Would the correct approach in Next.js be to instantiate a single Supabase object in a useContext and then use it throughout the entire project?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I have self-hosted Supabase on a machine with 2 cores and 8GB of RAM. Recently, we've encountered occasional 500 errors with Supabase, where supabase-py fails to fetch data from the Supabase database, returning a 500 error. The issue is difficult to reproduce, but here are the steps we've tried:
We checked the Docker logs but found no 500-related errors.
We reviewed Supabase's analytics but found it unusable (we referred to the relevant GitHub issue, but it's still not working).
We suspect the issue might be due to a small connection pool, preventing new instances from connecting. However, we're not sure how to modify the connection pool size on a self-hosted Supabase.
We checked the Nginx logs and found records of failed requests, but we’re unsure how to resolve this.
We also looked into the official Supabase Next.js documentation and noticed the same pattern, where createClient is used directly within different page.jsx files. After briefly reviewing the supabase-js code, we found that a Postgres connection object is created. In more complex projects, where many instances of the Supabase object are created, could this be causing the connection pool to be insufficient?
Would the correct approach in Next.js be to instantiate a single Supabase object in a useContext and then use it throughout the entire project?
Looking forward to your feedback.
Beta Was this translation helpful? Give feedback.
All reactions