Open hengjiUSTC opened 1 year ago
It seems like you are trying to increase the timeout limit for a specific function in your Vercel deployment. However, you are encountering an issue where the functions and builds are conflicting with each other.
One solution to this problem is to separate the long-running operation into its own Vercel function, rather than having it run as part of the Django app. You can create a separate directory for this function and define a new vercel.json file for it with the desired maxDuration value.
Above solution works. Create a simple python function and add the following in vercel.json file
"functions": { "api/*.py": { "maxDuration": 300 }
For https://github.com/vercel/examples/blob/main/python/django/vercel.json we have use case that some operations (open ai apis) takes longer than 10s. Currently vercel returns 504 error similar to https://community.openai.com/t/api-504s-in-production-vercel-only/28795/8. I tried to update vercel.json to
But this won't work due to conflict of functions and builds. How could we fix this issue to enlarge timeout limit ?