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
[Bug?]: RedwoodJS Deploy to Vercel with a vercel.json in the project causes the deploy to loop for 10minutes on vercel #10022
Comments
Hey @RinKimLaw I tried making a repro (albeit with just the graphql function) and couldn't reproduce 8-10 minute looping builds. One thing I'm wondering: is the I'm wondering if that's the problem. I feel like maybe you should actually end up using the Node.js runtime via |
Hi @jtoar, I'm running into the same issue here trying to extend my function timeouts. The selection of the runtime is referenced in the docs here. It seems this was suggested by vercel support to a user in this community post. As it stands, the default deploy that runs the |
It appears that targeting the root graphql file only will allow you to customize options for the server file but not the nested functions. Building will succeed with this configuration {
"functions": {
"api/src/functions/*.*": {
"maxDuration": 20,
"runtime": "@vercel/[email protected]"
}
} Attempting to set options for a nested function will result in recursive builds {
"functions": {
"api/src/functions/*.*": {
"maxDuration": 20,
"runtime": "@vercel/[email protected]"
},
"api/src/functions/nestedFunction/*.*": {
"maxDuration": 300,
"runtime": "@vercel/[email protected]"
}
}
} I have verified this both with the local This restricts customization and pretty much rules out vercel as viable platform for all but the most simple apps built with redwood. For context I am also running |
I think there's a way to configure the vercel.json for redwoodjs that's not completely/accurately documented anywhere because with the default settings (No vercel.json), the project deploys within 1m30s. Also, all the config in my vercel.json is ignored, the memory size is always the default 1024MB. |
I believe that https://community.redwoodjs.com/t/increase-timeout-duration-of-api-in-vercel/5446/3 address this issue with some docs to set the timeout on Vercel. But I may be wrong? |
Just to clarify - this issue related to the length of the build time (not the timeout of the function) -- because Vercel is building the redwoodJS app multiple times (once per api/function)? |
@dthyresson That documentation only works for the base graphql function. If you try to specify a different timeout or memory settings for the serverless functions in sub-directories, it will build recursively, not just once per function |
I wonder if there's any update on this? I previously tried to post this as an issue on Vercel's github but couldn't get through. For now it's fine deploying Redwood to vercel with default settings for me, but it's a pretty major issue that neither the function size nor the function timeout can be adjusted using vercel.json. |
Hi @RinKimLaw - I am trying to remember the details but does this https://redwoodjs.com/docs/deploy/vercel#verceljson-configuration help? I imagine that one might have to specify a function (not the GraphQL function listed).. I’d this does not help, could you share an example that does not work as expected? |
@dthyresson No that config didn't work for me. It eventually deploys after recursively building everything, but neither of the function parameters are honoured (Memory or timeout). |
Opened an issue on Vercel's side https://github.com/orgs/vercel/discussions/6526 |
@RinKimLaw We will likely have to create a small reproducible case for Vercel to try. Do you have a public repo of a project we can share or could you post the Vercel config you are using to make sure we’re doing the same. Thanks. |
@dthyresson I can setup a public repo tomorrow to demo the issue. |
Thank you so much! This will really help as I can share with Vercel, too. |
Hi, just on my personal account -
Values are not honoured for the tester1 function. The build is also recursive and builds twice, once for each function. |
What's not working?
This is my vercel.json
My project config is defaults for a redwoodjs project on [email protected].
With the vercel.json the build keeps looping again and again for 8-10 minutes and then eventually succeeds
Without the vercel.json the build succeeds in 1m30s
I'm guessing Vercel's default config for RedwoodJS projects is somehow being overridden by my vercel.json, causing this looping behaviour.
How do we reproduce the bug?
Create a new project with RedwoodJS typescript and setup a vercel deploy. Add a vercel.json to the project with some config for the functions.
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: