netlify/cli

Increased Netlify Function timeouts not respected by `netlify dev`

Opened this issue · 0 comments

Describe the bug

We use Netlify Functions with an increased timeout (26s), but when using netlify dev, the lambda-local package is provided with 10s, and thus we see a 10s timeout on our Functions locally.

It appears as though the 10s comes from here:

cli/src/utils/dev.ts

Lines 93 to 94 in e87e5ad

// default 10 seconds for synchronous functions
const SYNCHRONOUS_FUNCTION_TIMEOUT = 10

The line to override that with "site configuration" is here:

syncFunctions: siteInfo.functions_config?.timeout ?? SYNCHRONOUS_FUNCTION_TIMEOUT,

But upon debugging, siteInfo.functions_config?.timeout does not exist. However, siteInfo.functions_timeout does. Should the code be using that instead?

Steps to reproduce

  1. Have a Netlify Function project with an increased timeout
  2. Run one of those functions past 10s
  3. See that it times out at 10s anyway

Configuration

No response

Environment

  System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Max
    Memory: 3.42 GB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
    bun: 1.0.30 - ~/.bun/bin/bun
  npmPackages:
    netlify-cli: 12.2.9 => 12.2.9

We are using a very outdated version of netlify-cli, but the issue still exists in main/the latest version