Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’2mo agoβ€’
8 replies
Ninjeneer

Long run functions through RPC

PostgRESTSolved🟒SQL
Hey! I'm running a function that needs to do some vector search on a 17k rows table, with an index on the embedding column.
My SQL query basically is: give me the 5 most similar entries to <this given vector> in the table, excluding those 3k ids. Running this function in the SQL Editor works fine, but when I use it from my server, using
supabase.rpc('my function')
supabase.rpc('my function')
I'm getting a statement timeout.

I tried to set statement timeout higher in SB (2mins) but it fails way before 2 minutes are reached. According to GPT, Supabase also has timeout limitations at RPC level.

Is there any way to increase this timeout ? Or if I ditch RPC for something else, any way to have long runs functions working ?

Thank you!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Securing Helper Functions in RPC
SupabaseSSupabase / help-and-questions
4d ago
where are RPC functions logs?
SupabaseSSupabase / help-and-questions
4mo ago
Updating DB: Edge functions or RPC?
SupabaseSSupabase / help-and-questions
4mo ago
Edge functions taking too long
SupabaseSSupabase / help-and-questions
2mo ago