Recent Unexplainable Slowdowns

Hello, We have been experiencing significant write performance issues that started about a week ago across our three separate Supabase databases (dev, staging, production). Seemingly random write query slowdowns are visible across our entire app. We are seeing frequent 15 second Vercel functions time out in the middle of inserting data into the database in ways that never timed out until this week. We've tried rolling back code changes up to 2 months (this issue has only been occurring for about a week). We've tried testing the speed of our queries individually from the Supabase console, they're all very fast. We've even simplified to the point of our app, running locally, directly connecting to our Supabase database, but the slowdowns persist. Example timing data from 6 consecutive runs of the same local script: First Run: 1.8 seconds Second Run: 1.3 seconds Third Run: 38.3 seconds < --- Why ?? Fourth Run: 14.9 seconds < --- Why ?? Fifth Run: 1.2 seconds Sixth Run: 1.4 seconds The script simply runs a for loop from 0-20. Each time, it executes a simple insert query on our folders table. Our development team (including me) has been investigating this for ~2 days now and, while we seem to have pinpointed the database as the root cause, we cannot figure out what has changed. Any assistance from this community would be so greatly appreciated. Thank you
3 Replies
ibrahim
ibrahim2mo ago
Hmm i 'm not sure what could be causing this either. Some suggestions: making use of https://supabase.com/docs/guides/troubleshooting/understanding-postgresql-explain-output-Un9dqX explain analyze to see if it provided more information. Taking a look at the query performance monitor on supabase https://supabase.com/dashboard/project/_/reports/query-performance?minCalls=NaN
Supabase Docs | Troubleshooting | Understanding PostgreSQL EXPLAIN ...
Supabase is the Postgres development platform providing all the backend features you need to build a product.
ibrahim
ibrahim2mo ago
If it is database related it might be some kind of issue with your actual instance that is unique to your project so i would also reccomend filing a support ticket.
ibrahim
ibrahim2mo ago
Also see if your database health looks okay https://supabase.com/dashboard/project/_/reports/database

Did you find this page helpful?