vercel / vercel/examples

Django project enlarge timeout.

Open
#615 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.2k
Forks
1.8k
Avg merge
3d 12h
Merged PRs (30d)
6

Description

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

{
  "builds": [
    {
      "src": "vercel_app/wsgi.py",
      "use": "@vercel/python"
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "vercel_app/wsgi.py"
    }
  ],
  "functions": {
    "bot/**/*": {
      "maxDuration": 60
    }
  }
}

But this won't work due to conflict of functions and builds. How could we fix this issue to enlarge timeout limit ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with python/django/vercel.json and compare the existing builds and routes configuration with the attempted functions configuration. Investigate how the Django example can set a longer function timeout without the reported conflict. Done means the example supports operations longer than 10 seconds without returning a 504 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.