Back to Supabase

Canceling Statement Due To Statement Timeout 581wFv

apps/docs/content/troubleshooting/canceling-statement-due-to-statement-timeout-581wFv.mdx

1.26.041.1 KB
Original Source

If encountering 504 or timeout errors in the Dashboard, check out this guide

You can run this query to check the current settings set for your roles: SELECT rolname, rolconfig FROM   pg_roles;

To increase the statement_timeout for a specific role, you may follow the instructions here. Note that it may require a quick reboot for the changes to take effect.

Additionally, to check how long a query is taking, you can check the Query Performance report which can give you more information on the query's performance: https://app.supabase.com/project/_/advisors/query-performance. You can use the query plan analyzer on any expensive queries that you have identified: explain analyze <query-statement-here>;. For supabase-js/ PostgREST queries you can use .explain().

You can also make use of Postgres logs that will give you useful information like when the query was executed: https://app.supabase.com/project/_/logs/postgres-logs.