© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
GaryLake

passing json as parameter to rpc – size limit?

I'm trying to do a lot of batch processing of data from another API into Supabase.

Looping my json outside of the rpc call and inserting one row at a time is predictably slow (and wasteful in its nature), so now I've MVPed what I was trying to do, I'm looking at passing json in to the rpc as a parameter and looping inside the rpc.

However, I was wondering if there's an actual limit on the request size you can make – i.e. how many kb/mb of json can I sensibly chuck into an rpc before I need to think about paginating my requests...

Bear in mind I'm calling from an edge function but not with an end user to worry about... when's it going to fall over?:

* There's a kb/mb limit on the request size you can make – don't send more than xxx kb/mb!
* There's no limit on request size to .rpc() but you'll hit a memory limit of xxx kb/mb either on the edge function or the postgres function if you're building up big lumps of json
* It's going to fail in ways you cannot image if you send more than xxxx

I've done some testing and my payload is likely to be 10-15kb of json per call day to day as I only grab data updated since last run. However, on first run or if a huge update has been made (which will be a few times a year), I'm imagining that I'll be wanting to try and process and insert anything from 200-300kb of json or maybe more!?
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

RPC parameter list
SupabaseSSupabase / help-and-questions
4y ago
Passing variables to RPC for RLS
SupabaseSSupabase / help-and-questions
3y ago
Database size limit
SupabaseSSupabase / help-and-questions
3y ago
Storage Size limit problem
SupabaseSSupabase / help-and-questions
5mo ago