Memory Leak when switching project url

I am migrating a table from one project (SMALL) to another one (XLARGE) I noticed that when I switch the project url and key in createClient and then I execute a SELECT query using JS SDK, I get a memory leak. This is strange because the same exact query works fine for the old database. Any idea why this happen? I also saw that using the DB with more resources, the query takes more time (8 secs) while using the smaller one it takes less (2 secs)
7 Replies
silentworks
silentworks4w ago
How do you know it's a memory leak? what does your query look like? is the dataset the same in both instances?
FreeZy
FreeZyOP4w ago
1. I can see my script Memory usage jumpting to 1/2G in few seconds 2. the query is a normal select:
const { data, error } = await supabase
.from('my_table')
.select('*')
.eq('var', var)
const { data, error } = await supabase
.from('my_table')
.select('*')
.eq('var', var)
3. Yes, I exported using csv from the small one and imported as csv in the bigger one
silentworks
silentworks4w ago
I would expect the larger instance to be faster than the smaller instance. You will probably need to contact Supabase support about this https://supabase.com/dashboard/support/new Also add this to the support request when you make it and any other information that might be helpful. Have you tried sending the same query multiple times to see if there is any caching going on with one over the other?
FreeZy
FreeZyOP4w ago
yes tried Also I just tried querying a different table from the bigger db and it works fine So I assume there is an issue in the export/import phase yes done. Waiting for a response
silentworks
silentworks4w ago
Can you export the data as SQL rather than CSV and then just paste it in the SQL editor and execute the insert statements?
FreeZy
FreeZyOP4w ago
I try WROKED! Thank you so much
silentworks
silentworks4w ago
Hmm I wonder what the CSV export/import was doing that was different. I think you should reply to your existing Supabase support ticket and mention that about the CSV export/import (if you have time that is).

Did you find this page helpful?