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

Serverless Function runtime provided does not support more than 4KB for environment variables #183

Open
omerdn1 opened this issue Dec 23, 2024 · 3 comments

Comments

@omerdn1
Copy link

omerdn1 commented Dec 23, 2024

Hello,

We're getting this error on deployment build of the rust runtime:

Serverless Function runtime provided does not support more than 4KB for environment variables

Reading through Vercel's limitation docs:
https://vercel.com/docs/projects/environment-variables#environment-variable-size

It seems that the limit should be 64kb.
In any case, we didn't get this error for our node.js serverless functions. What could be wrong here?

@dglsparsons
Copy link
Collaborator

Hi, nodejs has a large env support which allows it up to 64Kib. The Rust runtime does not support this and is capped at 4Kib. You may want to unselect the option 'automatically expose system env variables'. Hope this helps!

@omerdn1
Copy link
Author

omerdn1 commented Dec 24, 2024

@dglsparsons Hi, is there another way we could tackle this? This option appears to be global and not runtime specific, we don't want our next.js environment to be affected by this.

Also, out of curiosity, what exactly is the reason behind this increased limit for the Rust runtime?

@dglsparsons
Copy link
Collaborator

Hi @omerdn1, i'm not aware of any specific way, other than having fewer environment variables or shorter commit messages.

It's not an increased limit for Rust, but instead, NodeJS has additional support allowing more environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants