Netlify Build exceeded maximum allowed runtime

Hello Netlify Community,

Netlify newbie here :raised_hand:

My netlify build fails without providing an informative error.
The netlify site name is fluffy-vacherin-570d98.netlify.app
The log during the build process is the following. I can’t really decipher what is wrong based on this log. Appreciate the help in advance.

11:58:44 PM: Waiting for other deploys from your team to complete. Check the queue: https://app.netlify.com/teams/rozbeh/builds
11:59:02 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
11:59:02 PM: build-image tag: v4.14.3
11:59:02 PM: buildbot version: 4f669c94b322d52f143cdcbb17e55d40094aa06d
11:59:02 PM: Fetching cached dependencies
11:59:02 PM: Failed to fetch cache, continuing with build
11:59:02 PM: Starting to prepare the repo for build
11:59:03 PM: No cached dependencies found. Cloning fresh repo
11:59:03 PM: git clone https://github.com/ROZBEH/value-cumulation
11:59:04 PM: Preparing Git Reference refs/heads/main
11:59:04 PM: Parsing package.json dependencies
11:59:05 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn rw deploy netlify' versus '' in the Netlify UI
11:59:05 PM: Section completed: initializing
11:59:05 PM: Starting build script
11:59:05 PM: Installing dependencies
11:59:05 PM: Python version set to 2.7
11:59:05 PM: Downloading and installing node v16.18.1...
11:59:06 PM: Downloading https://nodejs.org/dist/v16.18.1/node-v16.18.1-linux-x64.tar.xz...
11:59:06 PM: Computing checksum with sha256sum
11:59:06 PM: Checksums matched!
11:59:08 PM: Now using node v16.18.1 (npm v8.19.2)
11:59:08 PM: Enabling node corepack
11:59:08 PM: Started restoring cached build plugins
11:59:08 PM: Finished restoring cached build plugins
11:59:08 PM: Attempting ruby version 2.7.2, read from environment
11:59:09 PM: Using ruby version 2.7.2
11:59:09 PM: Using PHP version 8.0
11:59:09 PM: Started restoring cached yarn cache
11:59:09 PM: Finished restoring cached yarn cache
11:59:09 PM: Installing yarn at version 1.22.19
11:59:09 PM: Preparing yarn@1.22.19 for immediate activation...
11:59:10 PM: yarn workspaces detected
11:59:10 PM: Installing NPM modules using Yarn version 3.2.0
11:59:10 PM: ➤ YN0050: The cache-folder option has been deprecated; use rc settings instead
11:59:10 PM: ➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
11:59:10 PM: ➤ YN0000: ┌ Resolution step
11:59:11 PM: ➤ YN0061: │ request@npm:2.88.2 is deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
11:59:12 PM: ➤ YN0061: │ har-validator@npm:5.1.5 is deprecated: this library is no longer supported
11:59:12 PM: ➤ YN0061: │ uuid@npm:3.4.0 is deprecated: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
11:59:13 PM: ➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
11:59:14 PM: ➤ YN0061: │ w3c-hr-time@npm:1.0.2 is deprecated: Use your platform's native performance.now() and performance.timeOrigin.➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
11:59:15 PM: ➤ YN0061: │ urix@npm:0.1.0 is deprecated: Please see https://github.com/lydell/urix#deprecated
11:59:15 PM: ➤ YN0061: │ source-map-resolve@npm:0.5.3 is deprecated: See https://github.com/lydell/source-map-resolve#deprecated
11:59:16 PM: ➤ YN0061: │ resolve-url@npm:0.2.1 is deprecated: https://github.com/lydell/resolve-url#deprecated
11:59:16 PM: ➤ YN0061: │ source-map-url@npm:0.4.1 is deprecated: See https://github.com/lydell/source-map-url#deprecated
11:59:16 PM: ➤ YN0061: │ stable@npm:0.1.8 is deprecated: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
11:59:19 PM: ➤ YN0061: │ querystring@npm:0.2.0 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:59:19 PM: ➤ YN0061: │ chokidar@npm:2.1.8 is deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
11:59:19 PM: ➤ YN0061: │ fsevents@npm:1.2.13 is deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
11:59:19 PM: ➤ YN0032: │ nan@npm:2.17.0: Implicit dependencies on node-gyp are discouraged
11:59:20 PM: ➤ YN0032: │ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
11:59:20 PM: ➤ YN0061: │ @types/express-unless@npm:2.0.1 is deprecated: This is a stub types definition. express-unless provides its own type definitions, so you do not need this installed.
11:59:21 PM: ➤ YN0061: │ source-map-resolve@npm:0.6.0 is deprecated: See https://github.com/lydell/source-map-resolve#deprecated
11:59:27 PM: ➤ YN0061: │ sane@npm:4.1.0 is deprecated: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
11:59:28 PM: ➤ YN0061: │ @npmcli/move-file@npm:1.1.2 is deprecated: This functionality has been moved to @npmcli/fs
11:59:39 PM: ➤ YN0002: │ @apollo/react-hooks@npm:4.0.0 doesn't provide graphql (p7a24a), requested by @apollo/client➤ YN0002: │ @redwoodjs/api-server@npm:2.2.5 doesn't provide @babel/core (p9a7ff), requested by @babel/plugin-transform-runtime➤ YN0002: │ @redwoodjs/cli@npm:2.2.5 doesn't provide react (p0413e), requested by @redwoodjs/prerender➤ YN0002: │ @redwoodjs/cli@npm:2.2.5 doesn't provide react-dom (p654b1), requested by @redwoodjs/prerender➤ YN0002: │ @redwoodjs/core@npm:2.2.5 doesn't provide @babel/eslint-parser (pd7db7), requested by @babel/eslint-plugin➤ YN0002: │ @redwoodjs/core@npm:2.2.5 doesn't provide eslint (pd7c56), requested by @babel/eslint-plugin➤ YN0002: │ @redwoodjs/eslint-config@npm:2.2.5 doesn't provide babel-plugin-module-resolver (p5439c), requested by eslint-import-resolver-babel-module➤ YN0002: │ @redwoodjs/graphql-server@npm:2.2.5 doesn't provide @envelop/core (p6746b), requested by @envelop/depth-limit➤ YN0002: │ @redwoodjs/graphql-server@npm:2.2.5 doesn't provide @envelop/core (p4b52e), requested by @envelop/disable-introspection➤ YN0002: │ @redwoodjs/graphql-server@npm:2.2.5 doesn't provide @envelop/core (p4b0f6), requested by @envelop/filter-operation-type➤ YN0002: │ @redwoodjs/graphql-server@npm:2.2.5 doesn't provide @envelop/core (pde36c), requested by @envelop/parser-cache➤ YN0002: │ @redwoodjs/graphql-server@npm:2.2.5 doesn't provide @envelop/core (pfec6f), requested by @envelop/validation-cache➤ YN0002: │ @redwoodjs/internal@npm:2.2.5 doesn't provide @babel/core (p295a2), requested by @babel/plugin-transform-typescript➤ YN0002: │ @redwoodjs/internal@npm:2.2.5 doesn't provide @babel/core (p89bd9), requested by @babel/register➤ YN0002: │ @redwoodjs/internal@npm:2.2.5 doesn't provide @babel/core (p6c84f), requested by babel-plugin-graphql-tag➤ YN0002: │ @redwoodjs/internal@npm:2.2.5 doesn't provide @babel/core (pef83d), requested by babel-plugin-polyfill-corejs3➤ YN0002: │ @redwoodjs/internal@npm:2.2.5 doesn't provide graphql-tag (p8600e), requested by @graphql-codegen/typescript-react-apollo➤ YN0002: │ @redwoodjs/internal@npm:2.2.5 doesn't provide graphql-tag (pb83d3), requested by babel-plugin-graphql-tag➤ YN0002: │ @redwoodjs/prerender@npm:2.2.5 [51cd6] doesn't provide prop-types (p988a8), requested by @redwoodjs/web➤ YN0002: │ @redwoodjs/router@npm:2.2.5 doesn't provide react (pf603a), requested by @reach/skip-nav➤ YN0002: │ @redwoodjs/router@npm:2.2.5 doesn't provide react-dom (p6649a), requested by @reach/skip-nav➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide @babel/core (p2dfa4), requested by @storybook/addon-essentials➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide @babel/core (pdd696), requested by babel-jest➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide @babel/core (pb34d9), requested by babel-plugin-inline-react-svg➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide @testing-library/dom (p7bfab), requested by @testing-library/user-event➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide prop-types (p09b27), requested by @redwoodjs/web➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react (p6dae6), requested by @redwoodjs/web➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react (pe6e52), requested by @storybook/builder-webpack5➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react (p5b168), requested by @storybook/manager-webpack5➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react (pb27ea), requested by @storybook/react➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react (p173dd), requested by @testing-library/react-hooks➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react (p30742), requested by @testing-library/react➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react-dom (p10cdd), requested by @redwoodjs/web➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react-dom (p3673e), requested by @storybook/builder-webpack5➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react-dom (pc25f1), requested by @storybook/manager-webpack5➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react-dom (p84973), requested by @storybook/react➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide react-dom (p94cf5), requested by @testing-library/react➤ YN0002: │ @redwoodjs/testing@npm:2.2.5 doesn't provide require-from-string (p37ab9), requested by @storybook/react➤ YN0002: │ @storybook/addon-docs@npm:6.5.9 [410ce] doesn't provide @babel/core (p91c81), requested by @babel/preset-env➤ YN0002: │ @storybook/addon-docs@npm:6.5.9 [410ce] doesn't provide @babel/core (p78d7f), requested by @babel/plugin-transform-react-jsx➤ YN0002: │ @storybook/addon-docs@npm:6.5.9 [410ce] doesn't provide @babel/core (pb5f92), requested by babel-loader➤ YN0002: │ @storybook/addon-docs@npm:6.5.9 [410ce] doesn't provide webpack (p9c6d5), requested by babel-loader➤ YN0002: │ @storybook/docs-tools@npm:6.5.9 doesn't provide react (p885e3), requested by @storybook/store➤ YN0002: │ @storybook/docs-tools@npm:6.5.9 doesn't provide react-dom (pcad9c), requested by @storybook/store➤ YN0002: │ @storybook/mdx1-csf@npm:0.0.1 doesn't provide @babel/core (p44796), requested by @babel/preset-env➤ YN0002: │ @storybook/telemetry@npm:6.5.9 doesn't provide react (p7926a), requested by @storybook/core-common➤ YN0002: │ @storybook/telemetry@npm:6.5.9 doesn't provide react-dom (p290a9), requested by @storybook/core-common➤ YN0002: │ @tensorflow/tfjs@npm:3.21.0 doesn't provide seedrandom (p563bf), requested by @tensorflow/tfjs-data➤ YN0002: │ api@workspace:api doesn't provide immer (p40edd), requested by @xstate/immer➤ YN0002: │ api@workspace:api doesn't provide xstate (pc4c95), requested by @xstate/immer➤ YN0002: │ graphql-config@npm:4.3.6 [5cfd3] doesn't provide @types/node (p24f9e), requested by cosmiconfig-typescript-loader➤ YN0002: │ graphql-config@npm:4.3.6 [5cfd3] doesn't provide @types/node (p391ea), requested by ts-node➤ YN0002: │ graphql-config@npm:4.3.6 [5cfd3] doesn't provide typescript (p11899), requested by cosmiconfig-typescript-loader➤ YN0002: │ graphql-config@npm:4.3.6 [5cfd3] doesn't provide typescript (p7ae56), requested by ts-node➤ YN0002: │ react-hot-toast@npm:2.3.0 [45f2e] doesn't provide csstype (pc0db2), requested by goober➤ YN0002: │ react-hot-toast@npm:2.3.0 [e6474] doesn't provide csstype (pb2637), requested by goober➤ YN0002: │ react-hot-toast@npm:2.3.0 [fa125] doesn't provide csstype (pa98cf), requested by goober➤ YN0002: │ react-loader-spinner@npm:6.0.0-0 [42b1e] doesn't provide react-is (pd263d), requested by styled-components➤ YN0002: │ web@workspace:web doesn't provide @mui/system (p1ef7b), requested by @mui/x-data-grid➤ YN0002: │ web@workspace:web doesn't provide graphql (p2b92c), requested by @redwoodjs/forms➤ YN0002: │ web@workspace:web doesn't provide postcss (p8b30f), requested by @fullhuman/postcss-purgecss➤ YN0002: │ web@workspace:web doesn't provide postcss (p59e4f), requested by autoprefixer➤ YN0002: │ web@workspace:web doesn't provide postcss (p02ace), requested by postcss-loader➤ YN0060: │ web@workspace:web provides react (pc1fd5) with version 17.0.2, which doesn't satisfy what react-autocomplete requests➤ YN0060: │ web@workspace:web provides react (pf2aad) with version 17.0.2, which doesn't satisfy what react-html-parser requests➤ YN0060: │ web@workspace:web provides react-dom (pc4267) with version 17.0.2, which doesn't satisfy what react-autocomplete requests➤ YN0002: │ web@workspace:web doesn't provide react-is (pc5bbb), requested by styled-components➤ YN0002: │ web@workspace:web doesn't provide webpack (pcfbfb), requested by postcss-loader➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
11:59:39 PM: ➤ YN0000: └ Completed in 28s 292ms
12:34:59 AM: Build exceeded maximum allowed runtime

Hi @ROZBEH,

On November 18, we were having some issues with Yarn. Could you try again?

Hi @hrishikesh ,
It turned out the issue of .netlify/functions/graphql.zip was 120 MB and above the limit? So I removed one of the packages and was able to deploy successfully.
Question, any idea I can still upload the 120MB graphql.zip? I really need that package and unfortunately that is a bit too large.

Thank you.

Glad to hear you were able to find the root cause, @ROZBEH :tada:

We’re not able to change that limit as it is bounded by the max AWS lambda size, not Netlify: Lambda quotas - AWS Lambda). This doc may guide you in working to reduce usage: https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/large-functions.md

Hope that helps, please keep us posted!

Hi @audrey
Thanks for the link. This is very informative.
Lets’s say someone must use a module and there is no way to use another alternative, what would you recommend? What other approaches you suggest? Is there an alternative way of implementing it?

Netlify doesn’t offer a native solution as of now. You can get creative by publishing a zip on the CDN, downloading that within your function, and then working your way with it. Definitely prone to problems.

Thanks for the tip @hrishikesh - appreciate it.