Skip to content
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

Supabase throws a code 431 when setting a giant variable #7083

Closed
oalexdoda opened this issue Sep 3, 2023 · 5 comments
Closed

Supabase throws a code 431 when setting a giant variable #7083

oalexdoda opened this issue Sep 3, 2023 · 5 comments
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@oalexdoda
Copy link

Describe the bug
When adding a field to Supabase with a super large value, it will throw an error 431. The only way to execute this is if you set it to auto-map.

image

To Reproduce
Steps to reproduce the behavior:

  1. Create a Supabase node
  2. Set the data to "Define Below for Each Column"
  3. Drop in a variable with a very large content (i.e. a vector embedding)
  4. See error

Expected behavior
It should not throw that error.

Environment (please complete the following information):

  • OS: Ubuntu (Latest Docker Image - DigitalOcean)
  • n8n Version: 1.4.0
  • Node.js Version: (N/A - Docker Image - DigitalOcean)
  • Database system: SQLite
  • Operation mode: main

Additional context
Add any other context about the problem here.

@Joffcom
Copy link
Member

Joffcom commented Sep 4, 2023

Hey @altechzilla,

A 431 normally means the header is too large so it is either Supabase saying the request is too large for it which for that part shouldn't be the case or your n8n installation might be throwing the error if you have not configured your reverse proxy or n8n to handle larger payloads.

If you can share a workflow that reproduces this though I can take more of a look.

@oalexdoda
Copy link
Author

Hey @Joffcom ,

Currently running on a 1 GB Memory / 1 Intel vCPU / 25 GB Disk DigitalOcean droplet. The Caddy reverse proxy is set according to the guide on the docs site, but not sure how to set it to handle larger payloads.

Would you suggest a minimal viable setup on DigitalOcean to avoid issues like this?

Here's a workflow:
https://share.abruptive.com/nOuQ6KBR

And the schema (please see REDACTED for details that were removed / credentials) if needed:
https://privatebin.net/?c1313f9287bae31f#Bx4DUQRK3KBxgfUM3vHUmLURmLEnmzsWqEPwmkYiibRB

Without the embeddings field set in the Supabase step:
https://share.abruptive.com/mXuv9DZL

And with the embeddings field set:
https://share.abruptive.com/Blu2XbyQ
https://share.abruptive.com/WnupRm45

It does run the workflow properly, so it seems like another UI / pre-validation issue.

@Joffcom
Copy link
Member

Joffcom commented Sep 4, 2023

Hey @altechzilla,

The issue probably won't be with your Droplet but more likely around the config itself, I have found issues with the smaller droplets in the past though.

When you see the error do you get any error in your browser dev console / network tab, It will more than likely be how the data is fetched from the n8n backend we could be sending too much data.

I will give it a test in the morning though to see if I can reproduce this.

@Joffcom
Copy link
Member

Joffcom commented Sep 11, 2023

@altechzilla So it looks like the issue here is we are sending the data to the backend to get the options in the URL and that is hitting a nodejs limit so this is not related directly to the supabase node. I have created N8N-6941 as a ticket to improve how the frontend talks to the backend and for a bit of fun I have even come up with a workaround for you.

You can use NODE_OPTIONS to set any specific nodejs environment variables for this one you would want to set --max-http-header-size to a value you are comfortable with, As a quick test I set it to 32768 and this allowed it to work.

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Sep 11, 2023
@janober
Copy link
Member

janober commented May 22, 2024

Fix got released with n8n@1.43.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

No branches or pull requests

4 participants