Skip to content

Deploy to Supabase Fails with Large CSV's "memory access out of bounds" #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danrasmuson opened this issue Mar 18, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@danrasmuson
Copy link

Bug report

Describe the bug

For large CSV's I'm getting this memory access out of bounds when deploying the database to supabase

To Reproduce

  1. Upload Sam.gov ContractOpporunitiesFullCSV (207 MB) https://drive.google.com/file/d/1_DaYluzfR4t_n4HkigHLqhlGTQ1Wy7_K/view?usp=sharing
  2. Click deploy to supabase
  3. Confirm you received memory error

Expected behavior

Expecting to upload to supabase

Screenshots

Image

System information

  • OS: Macos
  • Browser (if applies) Chrome
@danrasmuson danrasmuson added the bug Something isn't working label Mar 18, 2025
@gregnr
Copy link
Collaborator

gregnr commented Mar 20, 2025

Hey @danrasmuson, thanks for reporting. The deploy logic does a pg_dump under the hood, so my best guess with this is that pg_dump executes a query with a response that is too large for PGlite's WASM memory to handle.

This might not be a trivial problem to solve. Could you try manually running a dump on the browser DB (top right -> Download), and let me know if this works? If so you could manually restore this dump as an interim solution

@danrasmuson
Copy link
Author

Hi @gregnr,

When I do top right -> Download with this database I get this error.

Image

Is it possible to stream or chunk the pg_dump process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants