Failed during stage 'building site': Do I need to upgrade to paid Contentful?

https://japan-society.netlify.app/

I’m not sure what is going on but our site starting having build fails last night. I got it to succeed a build once after clearing a cache but after that it keeps failing.

Our IT support says we need to pay for a higher tier Contentful account because our API calls are above 55 per second but I’m also seeing a build error. Any idea if its just I need to pay or there is more wrong even after I upgrade the Contentful plan from free to paid?

9:57:41 AM: Build ready to start
9:57:45 AM: build-image version: 6ac9cdbcc295289dbaea7d39b2f1a3ac25ad3380 (xenial)
9:57:45 AM: build-image tag: release-v3.14.0
9:57:45 AM: buildbot version: 130c63f822e79b73b71cdfefdabcf7970433539d
9:57:45 AM: Fetching cached dependencies
9:57:45 AM: Starting to download cache of 163.9MB
9:57:46 AM: Finished downloading cache in 1.237691529s
9:57:46 AM: Starting to extract cache
9:57:48 AM: Finished extracting cache in 2.302504756s
9:57:48 AM: Finished fetching cache in 3.586962606s
9:57:48 AM: Starting to prepare the repo for build
9:57:49 AM: Preparing Git Reference refs/heads/main
9:57:49 AM: Parsing package.json dependencies
9:57:50 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'netlify/functions' versus '' in the Netlify UI
9:57:50 AM: Starting build script
9:57:50 AM: Installing dependencies
9:57:50 AM: Python version set to 2.7
9:57:51 AM: Started restoring cached node version
9:57:52 AM: Finished restoring cached node version
9:57:53 AM: v12.18.0 is already installed.
9:57:53 AM: Now using node v12.18.0 (npm v6.14.4)
9:57:53 AM: Started restoring cached build plugins
9:57:53 AM: Finished restoring cached build plugins
9:57:53 AM: Attempting ruby version 2.7.1, read from environment
9:57:53 AM: Started restoring cached ruby version
9:57:53 AM: Finished restoring cached ruby version
9:57:54 AM: Using ruby version 2.7.1
9:57:55 AM: Using PHP version 5.6
9:57:55 AM: No npm workspaces detected
9:57:55 AM: Started restoring cached node modules
9:57:55 AM: Finished restoring cached node modules
9:57:55 AM: Started restoring cached go cache
9:57:55 AM: Finished restoring cached go cache
9:57:55 AM: go version go1.14.4 linux/amd64
9:57:55 AM: go version go1.14.4 linux/amd64
9:57:55 AM: Installing missing commands
9:57:55 AM: Verify run directory
9:57:56 AM: ​
9:57:56 AM: ────────────────────────────────────────────────────────────────
9:57:56 AM:   Netlify Build                                                 
9:57:56 AM: ────────────────────────────────────────────────────────────────
9:57:56 AM: ​
9:57:56 AM: ❯ Version
9:57:56 AM:   @netlify/build 27.4.1
9:57:56 AM: ​
9:57:56 AM: ❯ Flags
9:57:56 AM:   baseRelDir: true
9:57:56 AM:   buildId: 62d6b7e9e964572f84160789
9:57:56 AM:   deployId: 62d6b8551b51aa0009b171b7
9:57:56 AM: ​
9:57:56 AM: ❯ Current directory
9:57:56 AM:   /opt/build/repo
9:57:56 AM: ​
9:57:56 AM: ❯ Config file
9:57:56 AM:   /opt/build/repo/netlify.toml
9:57:56 AM: ​
9:57:56 AM: ❯ Context
9:57:56 AM:   production
9:57:57 AM: ​
9:57:57 AM: ❯ Loading plugins
9:57:57 AM:    - netlify-plugin-cache-nextjs@1.4.0 from Netlify app
9:57:57 AM:    - @netlify/plugin-nextjs@1.1.5 from Netlify app
9:57:57 AM: ​
9:57:57 AM: ❯ Outdated plugins
9:57:57 AM:    - @netlify/plugin-nextjs@1.1.5: latest version is 4.12.2
9:57:57 AM:      Migration guide: https://ntl.fyi/next-plugin-migration
9:57:57 AM:      To upgrade this plugin, please uninstall and re-install it from the Netlify plugins directory (https://app.netlify.com/plugins)
9:57:57 AM: ​
9:57:57 AM: ────────────────────────────────────────────────────────────────
9:57:57 AM:   1. netlify-plugin-cache-nextjs (onPreBuild event)             
9:57:57 AM: ────────────────────────────────────────────────────────────────
9:57:57 AM: ​
9:57:58 AM: Restored the cached .next folder at the location `.next/cache`
9:57:58 AM: ​
9:57:58 AM: (netlify-plugin-cache-nextjs onPreBuild completed in 162ms)
9:57:58 AM: ​
9:57:58 AM: ────────────────────────────────────────────────────────────────
9:57:58 AM:   2. @netlify/plugin-nextjs (onPreBuild event)                  
9:57:58 AM: ────────────────────────────────────────────────────────────────
9:57:58 AM: ​
9:57:58 AM: ​
9:57:58 AM: (@netlify/plugin-nextjs onPreBuild completed in 8ms)
9:57:58 AM: ​
9:57:58 AM: ────────────────────────────────────────────────────────────────
9:57:58 AM:   3. Build command from Netlify app                             
9:57:58 AM: ────────────────────────────────────────────────────────────────
9:57:58 AM: ​
9:57:58 AM: $ next build && next export
9:57:58 AM: Browserslist: caniuse-lite is outdated. Please run:
9:57:58 AM: npx browserslist@latest --update-db
9:57:58 AM: Loaded env from /opt/build/repo/.env.production
9:57:58 AM: info  - Creating an optimized production build...
9:58:05 AM: Browserslist: caniuse-lite is outdated. Please run:
9:58:05 AM: npx browserslist@latest --update-db
9:58:05 AM: info  - Using external babel configuration from /opt/build/repo/.babelrc
9:58:18 AM: warn  - Compiled with warnings
9:58:18 AM: ./node_modules/next/dist/next-server/server/load-components.js
9:58:18 AM: Critical dependency: the request of a dependency is an expression
9:58:18 AM: ./node_modules/next/dist/next-server/server/load-components.js
9:58:18 AM: Critical dependency: the request of a dependency is an expression
9:58:18 AM: ./node_modules/next/dist/next-server/server/require.js
9:58:18 AM: Critical dependency: the request of a dependency is an expression
9:58:18 AM: ./node_modules/next/dist/next-server/server/require.js
9:58:18 AM: Critical dependency: the request of a dependency is an expression
9:58:18 AM: ./node_modules/next/dist/next-server/server/require.js
9:58:18 AM: Critical dependency: the request of a dependency is an expression
9:58:18 AM: ./node_modules/graphql-request/node_modules/node-fetch/lib/index.js
9:58:18 AM: Module not found: Can't resolve 'encoding' in '/opt/build/repo/node_modules/graphql-request/node_modules/node-fetch/lib'
9:58:18 AM: info  - Collecting page data...
9:58:20 AM: Warning: You have opted-out of Automatic Static Optimization due to `getInitialProps` in `pages/_app`. This does not opt-out pages with `getStaticProps`
9:58:20 AM: Read more: https://err.sh/next.js/opt-out-auto-static-optimization
10:00:18 AM: info  - Generating static pages (0/497)
10:00:26 AM: info  - Generating static pages (124/497)
10:00:31 AM: info  - Generating static pages (248/497)
10:00:34 AM: Unhandled error during request: ClientError: You have exceeded the rate limit of this Space by making too many API requests within a short timespan. Please wait a moment before trying the request again.: {"response":{"errors":[{"message":"You have exceeded the rate limit of this Space by making too many API requests within a short timespan. Please wait a moment before trying the request again.","extensions":{"contentful":{"code":"RATE_LIMIT_EXCEEDED","requestId":"a6b6b030-ca12-49ad-bf49-8b14851e0005"}}}],"status":429},"request":{"query":"query GET_CATEGORY_SECTION_LIST($limit: Int = 4, $skip: Int = 0, $alias: String!) {\n  categorySectionListCollection(limit: 1, where: {category: {urlAlias: $alias}}) {\n    total\n    skip\n    limit\n    items {\n      category {\n        category\n        urlAlias\n        featuredHtml\n        sponsorHtml\n        description\n        active\n        series\n        image {\n          url\n          title\n          description\n        }\n        parent {\n          category\n          urlAlias\n          sponsorHtml\n          description\n          active\n          image {\n            url\n            title\n            description\n          }\n        }\n      }\n      categorySectionsCollection(skip: 0, limit: 4) {\n        total\n        skip\n        limit\n        items {\n          internalName\n          title\n          link\n          maxPostLimit\n          contentsCollection(skip: $skip, limit: $limit) {\n            total\n            skip\n            limit\n            items {\n              __typename\n              ... on Sandbox {\n                sys {\n                  publishedAt\n                }\n                title\n                tags\n                urlAlias\n                featuredNumber\n                openGraphImage {\n                  url\n                  title\n                }\n                isHidden\n                publishedAt\n                subcategoryLabel\n                cardRedirect\n                galleryCollection(skip: 0, limit: 4) {\n                  skip\n                  limit\n                  items {\n                    url\n                    title\n                    description\n                  }\n                }\n                instancesCollection(skip: 0, limit: 10) {\n                  total\n                  limit\n                  skip\n                  items {\n                    type\n                    label\n                    displayEventButNotOnCalendar\n                    performanceStartAt\n                    allDayEventAt\n                    webcastEndAt\n                    webcastStartAt\n                    multiDayEndAt\n                    multiDayStartAt\n                  }\n                }\n                category {\n                  sys {\n                    id\n                  }\n                }\n              }\n              ... on LanguageCenterCources {\n                sys {\n                  publishedAt\n                }\n                urlAlias\n                ctaUrl\n                ctaText\n                title\n                eyecatch {\n                  title\n                  description\n                  contentType\n                  fileName\n                  size\n                  url\n                  width\n                  height\n                }\n              }\n              ... on Event {\n                title\n                urlAlias\n                isHidden\n                online\n                galleryCollection(skip: 0, limit: 4) {\n                  skip\n                  limit\n                  items {\n                    url\n                    title\n                    description\n                  }\n                }\n                cta {\n                  buttonTitle\n                  url\n                }\n                subcategoryLabel\n                descriptionOnHome\n                cardRedirect\n                instancesCollection(skip: 0, limit: 10) {\n                  total\n                  limit\n                  skip\n                  items {\n                    type\n                    label\n                    displayEventButNotOnCalendar\n                    performanceStartAt\n                    allDayEventAt\n                    webcastEndAt\n                    webcastStartAt\n                    multiDayEndAt\n                    multiDayStartAt\n                  }\n                }\n                heroImage {\n                  title\n                  description\n                  contentType\n                  fileName\n                  size\n                  url\n                  width\n                  height\n                }\n                category {\n                  sys {\n                    id\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n","variables":{"alias":"contemporary-japan-global-initiatives-sustainability"}}}
10:00:34 AM:     at GraphQLClient.<anonymous> (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11140:35)
10:00:34 AM:     at step (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11031:23)
10:00:34 AM:     at Object.next (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11012:53)
10:00:34 AM:     at fulfilled (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11003:58)
10:00:34 AM:     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
10:00:34 AM:   response: { errors: [ [Object] ], status: 429 },
10:00:34 AM:   request: {
10:00:34 AM:     query: 'query GET_CATEGORY_SECTION_LIST($limit: Int = 4, $skip: Int = 0, $alias: String!) {\n' +
10:00:34 AM:       '  categorySectionListCollection(limit: 1, where: {category: {urlAlias: $alias}}) {\n' +
10:00:34 AM:       '    total\n' +
10:00:34 AM:       '    skip\n' +
10:00:34 AM:       '    limit\n' +
10:00:34 AM:       '    items {\n' +
10:00:34 AM:       '      category {\n' +
10:00:34 AM:       '        category\n' +
10:00:34 AM:       '        urlAlias\n' +
10:00:34 AM:       '        featuredHtml\n' +
10:00:34 AM:       '        sponsorHtml\n' +
10:00:34 AM:       '        description\n' +
10:00:34 AM:       '        active\n' +
10:00:34 AM:       '        series\n' +
10:00:34 AM:       '        image {\n' +
10:00:34 AM:       '          url\n' +
10:00:34 AM:       '          title\n' +
10:00:34 AM:       '          description\n' +
10:00:34 AM:       '        }\n' +
10:00:34 AM:       '        parent {\n' +
10:00:34 AM:       '          category\n' +
10:00:34 AM:       '          urlAlias\n' +
10:00:34 AM:       '          sponsorHtml\n' +
10:00:34 AM:       '          description\n' +
10:00:34 AM:       '          active\n' +
10:00:34 AM:       '          image {\n' +
10:00:34 AM:       '            url\n' +
10:00:34 AM:       '            title\n' +
10:00:34 AM:       '            description\n' +
10:00:34 AM:       '          }\n' +
10:00:34 AM:       '        }\n' +
10:00:34 AM:       '      }\n' +
10:00:34 AM:       '      categorySectionsCollection(skip: 0, limit: 4) {\n' +
10:00:34 AM:       '        total\n' +
10:00:34 AM:       '        skip\n' +
10:00:34 AM:       '        limit\n' +
10:00:34 AM:       '        items {\n' +
10:00:34 AM:       '          internalName\n' +
10:00:34 AM:       '          title\n' +
10:00:34 AM:       '          link\n' +
10:00:34 AM:       '          maxPostLimit\n' +
10:00:34 AM:       '          contentsCollection(skip: $skip, limit: $limit) {\n' +
10:00:34 AM:       '            total\n' +
10:00:34 AM:       '            skip\n' +
10:00:34 AM:       '            limit\n' +
10:00:34 AM:       '            items {\n' +
10:00:34 AM:       '              __typename\n' +
10:00:34 AM:       '              ... on Sandbox {\n' +
10:00:34 AM:       '                sys {\n' +
10:00:34 AM:       '                  publishedAt\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                title\n' +
10:00:34 AM:       '                tags\n' +
10:00:34 AM:       '                urlAlias\n' +
10:00:34 AM:       '                featuredNumber\n' +
10:00:34 AM:       '                openGraphImage {\n' +
10:00:34 AM:       '                  url\n' +
10:00:34 AM:       '                  title\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                isHidden\n' +
10:00:34 AM:       '                publishedAt\n' +
10:00:34 AM:       '                subcategoryLabel\n' +
10:00:34 AM:       '                cardRedirect\n' +
10:00:34 AM:       '                galleryCollection(skip: 0, limit: 4) {\n' +
10:00:34 AM:       '                  skip\n' +
10:00:34 AM:       '                  limit\n' +
10:00:34 AM:       '                  items {\n' +
10:00:34 AM:       '                    url\n' +
10:00:34 AM:       '                    title\n' +
10:00:34 AM:       '                    description\n' +
10:00:34 AM:       '                  }\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                instancesCollection(skip: 0, limit: 10) {\n' +
10:00:34 AM:       '                  total\n' +
10:00:34 AM:       '                  limit\n' +
10:00:34 AM:       '                  skip\n' +
10:00:34 AM:       '                  items {\n' +
10:00:34 AM:       '                    type\n' +
10:00:34 AM:       '                    label\n' +
10:00:34 AM:       '                    displayEventButNotOnCalendar\n' +
10:00:34 AM:       '                    performanceStartAt\n' +
10:00:34 AM:       '                    allDayEventAt\n' +
10:00:34 AM:       '                    webcastEndAt\n' +
10:00:34 AM:       '                    webcastStartAt\n' +
10:00:34 AM:       '                    multiDayEndAt\n' +
10:00:34 AM:       '                    multiDayStartAt\n' +
10:00:34 AM:       '                  }\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                category {\n' +
10:00:34 AM:       '                  sys {\n' +
10:00:34 AM:       '                    id\n' +
10:00:34 AM:       '                  }\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '              }\n' +
10:00:34 AM:       '              ... on LanguageCenterCources {\n' +
10:00:34 AM:       '                sys {\n' +
10:00:34 AM:       '                  publishedAt\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                urlAlias\n' +
10:00:34 AM:       '                ctaUrl\n' +
10:00:34 AM:       '                ctaText\n' +
10:00:34 AM:       '                title\n' +
10:00:34 AM:       '                eyecatch {\n' +
10:00:34 AM:       '                  title\n' +
10:00:34 AM:       '                  description\n' +
10:00:34 AM:       '                  contentType\n' +
10:00:34 AM:       '                  fileName\n' +
10:00:34 AM:       '                  size\n' +
10:00:34 AM:       '                  url\n' +
10:00:34 AM:       '                  width\n' +
10:00:34 AM:       '                  height\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '              }\n' +
10:00:34 AM:       '              ... on Event {\n' +
10:00:34 AM:       '                title\n' +
10:00:34 AM:       '                urlAlias\n' +
10:00:34 AM:       '                isHidden\n' +
10:00:34 AM:       '                online\n' +
10:00:34 AM:       '                galleryCollection(skip: 0, limit: 4) {\n' +
10:00:34 AM:       '                  skip\n' +
10:00:34 AM:       '                  limit\n' +
10:00:34 AM:       '                  items {\n' +
10:00:34 AM:       '                    url\n' +
10:00:34 AM:       '                    title\n' +
10:00:34 AM:       '                    description\n' +
10:00:34 AM:       '                  }\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                cta {\n' +
10:00:34 AM:       '                  buttonTitle\n' +
10:00:34 AM:       '                  url\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                subcategoryLabel\n' +
10:00:34 AM:       '                descriptionOnHome\n' +
10:00:34 AM:       '                cardRedirect\n' +
10:00:34 AM:       '                instancesCollection(skip: 0, limit: 10) {\n' +
10:00:34 AM:       '                  total\n' +
10:00:34 AM:       '                  limit\n' +
10:00:34 AM:       '                  skip\n' +
10:00:34 AM:       '                  items {\n' +
10:00:34 AM:       '                    type\n' +
10:00:34 AM:       '                    label\n' +
10:00:34 AM:       '                    displayEventButNotOnCalendar\n' +
10:00:34 AM:       '                    performanceStartAt\n' +
10:00:34 AM:       '                    allDayEventAt\n' +
10:00:34 AM:       '                    webcastEndAt\n' +
10:00:34 AM:       '                    webcastStartAt\n' +
10:00:34 AM:       '                    multiDayEndAt\n' +
10:00:34 AM:       '                    multiDayStartAt\n' +
10:00:34 AM:       '                  }\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                heroImage {\n' +
10:00:34 AM:       '                  title\n' +
10:00:34 AM:       '                  description\n' +
10:00:34 AM:       '                  contentType\n' +
10:00:34 AM:       '                  fileName\n' +
10:00:34 AM:       '                  size\n' +
10:00:34 AM:       '                  url\n' +
10:00:34 AM:       '                  width\n' +
10:00:34 AM:       '                  height\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '                category {\n' +
10:00:34 AM:       '                  sys {\n' +
10:00:34 AM:       '                    id\n' +
10:00:34 AM:       '                  }\n' +
10:00:34 AM:       '                }\n' +
10:00:34 AM:       '              }\n' +
10:00:34 AM:       '            }\n' +
10:00:34 AM:       '          }\n' +
10:00:34 AM:       '        }\n' +
10:00:34 AM:       '      }\n' +
10:00:34 AM:       '    }\n' +
10:00:34 AM:       '  }\n' +
10:00:34 AM:       '}\n',
10:00:34 AM:     variables: { alias: 'contemporary-japan-global-initiatives-sustainability' }
10:00:34 AM:   }
10:00:34 AM: }
10:00:34 AM: Error occurred prerendering page "/education/language-center-courses". Read more: https://err.sh/next.js/prerender-error
10:00:34 AM: Error: You have exceeded the rate limit of this Space by making too many API requests within a short timespan. Please wait a moment before trying the request again.: {"response":{"errors":[{"message":"You have exceeded the rate limit of this Space by making too many API requests within a short timespan. Please wait a moment before trying the request again.","extensions":{"contentful":{"code":"RATE_LIMIT_EXCEEDED","requestId":"9e1e5a29-5251-4ff7-b4a7-b48238b12162"}}}],"status":429},"request":{"query":"query getEventList($limit: Int = 1, $skip: Int = 0, $categoryAlias: String!) {\n  eventCollection(order: [featuredNumber_ASC], limit: $limit, skip: $skip, where: {category: {urlAlias: $categoryAlias}}) {\n    limit\n    total\n    skip\n    items {\n      sys {\n        id\n        publishedAt\n      }\n      body\n      title\n      urlAlias\n      cardRedirect\n      online\n      isHidden\n      dateHidden\n      textUnderGallery\n      featuredNumber\n      galleryCollection {\n        skip\n        limit\n        items {\n          url\n          title\n          description\n        }\n      }\n      metaDescription\n      category {\n        category\n        sponsorHtml\n        description\n        urlAlias\n        active\n        image {\n          url\n        }\n        parent {\n          category\n          sponsorHtml\n          description\n          urlAlias\n          active\n          image {\n            url\n          }\n        }\n      }\n      cta {\n        buttonTitle\n        url\n      }\n      ticketing\n      approval\n      instancesCollection {\n        total\n        skip\n        limit\n        items {\n          multiDayEndAt\n          multiDayStartAt\n          webcastStartAt\n          webcastEndAt\n          allDayEventAt\n          performanceStartAt\n          displayEventButNotOnCalendar\n          label\n          type\n          indistinctDate\n        }\n      }\n      descriptionOnHome\n      heroImage {\n        sys {\n          id\n        }\n        title\n        description\n        contentType\n        fileName\n        url\n      }\n    }\n  }\n}\n","variables":{"categoryAlias":"language-center-courses","skip":0,"limit":1}}}
10:00:34 AM:     at GraphQLClient.<anonymous> (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11140:35)
10:00:34 AM:     at step (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11031:23)
10:00:34 AM:     at Object.next (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11012:53)
10:00:34 AM:     at fulfilled (/opt/build/repo/.next/serverless/pages/[categoryId]/[[...postId]].js:11003:58)
10:00:34 AM:     at runMicrotasks (<anonymous>)
10:00:34 AM:     at processTicksAndRejections (internal/process/task_queues.js:97:5)
10:00:37 AM: info  - Generating static pages (372/497)
10:00:44 AM: info  - Generating static pages (497/497)
10:00:44 AM: > Build error occurred
10:00:44 AM: Error: Export encountered errors on following paths:
10:00:44 AM: 	/education/language-center-courses
10:00:44 AM: 	/education/teacher-and-k-12/contemporary-japan-global-initiatives-sustainability
10:00:44 AM: 	/education/teacher-and-k-12/junior-fellows-program
10:00:44 AM: 	/education/teacher-and-k-12/us-japan-relations-teacher-development
10:00:44 AM:     at exportApp (/opt/build/repo/node_modules/next/dist/export/index.js:25:1103)
10:00:44 AM:     at processTicksAndRejections (internal/process/task_queues.js:97:5)
10:00:44 AM:     at async build (/opt/build/repo/node_modules/next/dist/build/index.js:37:212)
10:00:45 AM: ​
10:00:45 AM: ────────────────────────────────────────────────────────────────
10:00:45 AM:   "build.command" failed                                        
10:00:45 AM: ────────────────────────────────────────────────────────────────
10:00:45 AM: ​
10:00:45 AM:   Error message
10:00:45 AM:   Command failed with exit code 1: next build && next export (https://ntl.fyi/exit-code-1)
10:00:45 AM: ​
10:00:45 AM:   Error location
10:00:45 AM:   In Build command from Netlify app:
10:00:45 AM:   next build && next export
10:00:45 AM: ​
10:00:45 AM:   Resolved config
10:00:45 AM:   build:
10:00:45 AM:     command: next build && next export
10:00:45 AM:     commandOrigin: ui
10:00:45 AM:     environment:
10:00:45 AM:       - ALGOLIA_INDEX_NAME1
10:00:45 AM:       - INCOMING_HOOK_BODY
10:00:45 AM:       - INCOMING_HOOK_TITLE
10:00:45 AM:       - INCOMING_HOOK_URL
10:00:45 AM:       - ONEGRAPH_AUTHLIFY_TOKEN
10:00:45 AM:       - NEXT_PUBLIC_GRAPHQL_URL
10:00:45 AM:       - NEXT_PUBLIC_GRAPHQL_TOKEN
10:00:45 AM:     publish: /opt/build/repo/out
10:00:45 AM:     publishOrigin: ui
10:00:45 AM:   functionsDirectory: /opt/build/repo/netlify/functions
10:00:45 AM:   plugins:
10:00:45 AM:     - inputs: {}
10:00:45 AM:       origin: ui
10:00:45 AM:       package: netlify-plugin-cache-nextjs
10:00:45 AM:     - inputs: {}
10:00:45 AM:       origin: ui
10:00:45 AM:       package: '@netlify/plugin-nextjs'
10:00:45 AM: Caching artifacts
10:00:45 AM: Started saving node modules
10:00:45 AM: Finished saving node modules
10:00:45 AM: Started saving build plugins
10:00:45 AM: Finished saving build plugins
10:00:45 AM: Started saving pip cache
10:00:45 AM: Finished saving pip cache
10:00:45 AM: Started saving emacs cask dependencies
10:00:45 AM: Finished saving emacs cask dependencies
10:00:45 AM: Started saving maven dependencies
10:00:45 AM: Finished saving maven dependencies
10:00:45 AM: Started saving boot dependencies
10:00:45 AM: Finished saving boot dependencies
10:00:45 AM: Started saving rust rustup cache
10:00:45 AM: Finished saving rust rustup cache
10:00:45 AM: Started saving go dependencies
10:00:45 AM: Finished saving go dependencies
10:00:45 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:00:45 AM: Creating deploy upload records
10:00:45 AM: Failing build: Failed to build site
10:00:45 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:00:46 AM: Finished processing build request in 3m0.96105741s

@chrome I haven’t dug into your specific issues as there’s not a whole lot I can discern from only the error log, but I’m sure you’ve noticed that upgrading to a paid Contentful plan is a pretty steep cliff pricing wise.

If you have ample overall API usage still available, you’re just hitting a short term rate limit, and the length of the build time isn’t an issue, then you might want to investigate limiting the rate at which the build makes its requests to Contentful.

There are also other ways that you can implement a system to effectively avoid the API limits for performing builds, but it would require site code changes and thus may not be cost effective.