Site failing to finish building/trigger deploy step after adding second item to Netlify CMS collection

Whenever I’ve tried to add a second entry to a collection with Netlify CMS, my site has been failing to finish building, throwing the “Build exceeded maximum allowed runtime” error. This is with on a very simple Astro/Preact site i’m using to toy around with a new stack. The astro build script seems to be finishing as expected (see build logs below), but the build step itself still never finishes.

Whenever I delete all the entries in the collections, i’m able to create a new one successfully, but a second or third new entry always has the same outcome. I’ve tried:

  • clearing the deploy cache and retrying, but it has the same outcome each time.
  • renaming the collection
  • rewriting the config.yml file from scratch

Netlify site name:
https://eclectic-pixie-c28fb6.netlify.app

Public repo:

config.yml content:

backend:
  name: git-gateway
  branch: main
media_folder: "/public/uploads"
public_folder: "/uploads"
collections:
  - name: "blog_entries"
    label: "Blog Entries"
    editor:
      preview: false
    create: true
    folder: "src/pages/test-entries"
    slug: "{{fields.identifier}}"
    fields:
      - {label: "Identifier (set only once)", name: "identifier", widget: "string", hint: "URL friendly string containing only alphanumeric characters and hyphens. i.e. 'a-sample-identifier-1'"}
      - {label: "Title", name: "title", widgt: "string"}
      - {label: "Content", name: "body", widget: "markdown"}
      - {label: "Layout", name: "layout", widget: "hidden", default: "$/layouts/TestEntry.astro"}

Build log:

5:10:11 PM: Build ready to start
5:10:30 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
5:10:30 PM: build-image tag: v4.8.0
5:10:30 PM: buildbot version: e552b142336b2b1222a93a4fd4cbed0019c77b46
5:10:30 PM: Fetching cached dependencies
5:10:30 PM: Starting to download cache of 108.7MB
5:10:31 PM: Finished downloading cache in 1.155937052s
5:10:31 PM: Starting to extract cache
5:10:34 PM: Finished extracting cache in 2.738554488s
5:10:34 PM: Finished fetching cache in 3.905133911s
5:10:34 PM: Starting to prepare the repo for build
5:10:35 PM: Preparing Git Reference refs/heads/main
5:10:35 PM: Parsing package.json dependencies
5:10:36 PM: 
​
❯ Initial build environment
baseRelDir: true
branch: main
context: production
cwd: /opt/build/repo
featureFlags: []
mode: buildbot
repositoryRoot: /opt/build/repo
siteId: 168bc4c7-acc3-4f96-a2c2-6ddc91b2c318
​
❯ UI build settings
baseRelDir: true
build:
  command: npm run build-site
  environment:
    - NETLIFY_BUILD_DEBUG
    - ONEGRAPH_AUTHLIFY_TOKEN
  publish: dist
​
❯ Resolved build environment
branch: main
buildDir: /opt/build/repo
context: production
env: []
​
❯ Resolved config
build:
  command: npm run build-site
  commandOrigin: ui
  environment:
    - NETLIFY_BUILD_DEBUG
    - ONEGRAPH_AUTHLIFY_TOKEN
  publish: /opt/build/repo/dist
  publishOrigin: ui

5:10:36 PM: Starting build script
5:10:36 PM: Installing dependencies
5:10:36 PM: Python version set to 2.7
5:10:36 PM: Started restoring cached node version
5:10:37 PM: Finished restoring cached node version
5:10:38 PM: v16.14.2 is already installed.
5:10:38 PM: Now using node v16.14.2 (npm v8.5.0)
5:10:38 PM: Started restoring cached build plugins
5:10:38 PM: Finished restoring cached build plugins
5:10:38 PM: Attempting ruby version 2.7.2, read from environment
5:10:39 PM: Using ruby version 2.7.2
5:10:40 PM: Using PHP version 8.0
5:10:40 PM: No npm workspaces detected
5:10:40 PM: Started restoring cached node modules
5:10:40 PM: Finished restoring cached node modules
5:10:40 PM: Started restoring cached go cache
5:10:40 PM: Finished restoring cached go cache
5:10:40 PM: go version go1.16.5 linux/amd64
5:10:40 PM: go version go1.16.5 linux/amd64
5:10:40 PM: Installing missing commands
5:10:40 PM: Verify run directory
5:10:41 PM: ​
5:10:41 PM: ────────────────────────────────────────────────────────────────
5:10:41 PM:   Netlify Build                                                 
5:10:41 PM: ────────────────────────────────────────────────────────────────
5:10:41 PM: ​
5:10:41 PM: ❯ Version
5:10:41 PM:   @netlify/build 26.5.2
5:10:41 PM: ​
5:10:41 PM: ❯ Flags
5:10:41 PM:   apiHost: api.netlify.com
5:10:41 PM:   baseRelDir: true
5:10:41 PM:   branch: main
5:10:41 PM:   buildId: 62549933b514f6000899ff49
5:10:41 PM:   buildbotServerSocket: /tmp/netlify-buildbot-socket
5:10:41 PM:   cacheDir: /opt/build/cache
5:10:41 PM:   cachedConfigPath: /tmp/netlify_config.json
5:10:41 PM:   context: production
5:10:41 PM:   cwd: /opt/build/repo
5:10:41 PM:   deployId: 62549933b514f6000899ff4b
5:10:41 PM:   featureFlags:
5:10:41 PM:     - buildbot_build_go_functions
5:10:41 PM:     - zisi_parse_isc
5:10:41 PM:   framework: astro
5:10:41 PM:   functionsDistDir: /tmp/zisi-62549933b514f6000899ff4b
5:10:41 PM:   mode: buildbot
5:10:41 PM:   nodePath: /opt/buildhome/.nvm/versions/node/v16.14.2/bin/node
5:10:41 PM:   repositoryRoot: /opt/build/repo
5:10:41 PM:   saveConfig: true
5:10:41 PM:   sendStatus: true
5:10:41 PM:   siteId: 168bc4c7-acc3-4f96-a2c2-6ddc91b2c318
5:10:41 PM:   statsd:
5:10:41 PM:     host: 10.65.71.35
5:10:41 PM:     port: 8125
5:10:41 PM:   testOpts:
5:10:41 PM:     silentLingeringProcesses: ''
5:10:41 PM: ​
5:10:41 PM: ❯ Current directory
5:10:41 PM:   /opt/build/repo
5:10:41 PM: ​
5:10:41 PM: ❯ Config file
5:10:41 PM:   No config file was defined: using default values.
5:10:41 PM: ​
5:10:41 PM: ❯ Resolved config
5:10:42 PM:   build:
5:10:42 PM:     command: npm run build-site
5:10:42 PM:     commandOrigin: ui
5:10:42 PM:     environment:
5:10:42 PM:       - NETLIFY_BUILD_DEBUG
5:10:42 PM:       - ONEGRAPH_AUTHLIFY_TOKEN
5:10:42 PM:     publish: /opt/build/repo/dist
5:10:42 PM:     publishOrigin: ui
5:10:42 PM: ​
5:10:42 PM: ❯ Context
5:10:42 PM:   production
5:10:42 PM: ​
5:10:42 PM: ────────────────────────────────────────────────────────────────
5:10:42 PM:   1. Build command from Netlify app                             
5:10:42 PM: ────────────────────────────────────────────────────────────────
5:10:42 PM: ​
5:10:42 PM: $ npm run build-site
5:10:42 PM: > astro-preact@1.0.0 build-site
5:10:42 PM: > astro build
5:10:43 PM: 09:10:43 PM [build] Collecting build information...
5:10:48 PM: 09:10:48 PM [build] Completed in 4.53s.
5:10:48 PM: 
5:10:48 PM:  building client 
5:10:48 PM: vite v2.9.1 building for production...
5:10:48 PM: transforming...
5:10:48 PM: ✓ 10 modules transformed.
5:10:48 PM: rendering chunks...
5:10:48 PM: dist/entry.d942762e.js          2.25 KiB / gzip: 1.07 KiB
5:10:48 PM: dist/entry.9f59b8ca.js          0.43 KiB / gzip: 0.30 KiB
5:10:48 PM: dist/entry.65a8872b.js          0.24 KiB / gzip: 0.21 KiB
5:10:48 PM: dist/chunks/chunk.961bf7e7.js   8.67 KiB / gzip: 3.59 KiB
5:10:48 PM: Completed in 299ms.
5:10:48 PM: 
5:10:48 PM: 09:10:48 PM [build] Building for SSR...
5:10:49 PM: 09:10:49 PM [build] Completed in 449ms.
5:10:49 PM: 
5:10:49 PM:  generating static routes 
5:10:49 PM: ▶ src/pages/index.astro
5:10:49 PM:   └─ /index.html (+9ms)
5:10:49 PM: ▶ src/pages/test-entries/bizz-bang.md
5:10:49 PM:   └─ /test-entries/bizz-bang/index.html (+3ms)
5:10:49 PM: ▶ src/pages/test-entries/foo-bar.md
5:10:49 PM:   └─ /test-entries/foo-bar/index.html (+3ms)
5:10:49 PM: ▶ src/pages/test-entries.astro
5:10:49 PM:   └─ /test-entries/index.html (+4ms)
5:10:49 PM: ▶ src/pages/about.astro
5:10:49 PM:   └─ /about/index.html (+5ms)
5:10:49 PM: Completed in 34ms.
5:10:49 PM: 
5:10:49 PM: 09:10:49 PM [build] 5 page(s) built in 5.33s
5:10:49 PM: 09:10:49 PM [build] Complete!
5:46:11 PM: Build exceeded maximum allowed runtime

Hi there,

As far as I can tell you’ve had dozens of successful deploys since you wrote in. I expect that means you figured out what was going wrong and could fix it on your side - mind sharing more details for future explorers?

Hi there! Thanks for responding.

I actually was not able to figure out the bug from my post. I continued working on other features for my sandbox site, but the issue with collection entries has persisted. Now I’m unable to even create an initial entry for a collection, but only on some attempts. It’s been a very odd bug and I’m at a total loss as to what’s going on.

Hey there, @rmunsch :wave:

Thanks for your patience here. Would you be able to create a new site that reproduces this issue for us? I am having difficulty reproducing this over here, and that would be great assistance. Thanks!

Hi, @hillary!

I actually haven’t been able to reproduce it on a new site either. Still have no idea what’s going on here or what is causing it. For now, I’m going to abandon the original repo/site I have and move forward with the one where I haven’t been able to reproduce the bug.

I’ll keep you posted if I learn anything in the mean time.

Thanks for the help!

1 Like

Thanks for the update! We will leave this thread open for now. Please do follow up here if you are able to reproduce it and would like some assistance!

Hi again, @hillary!

So I’ve run into this issue again on my new site (https://astro-preact-netlify-cms-sandbox.netlify.app/). Still the same issue, but now this occurs randomly stemming from a rather diverse range of circumstances (editing a file’s content on Netlify CMS, updating a single line of HTML in an Astro template, adding new files to my repo are all recent changes that have caused it).

Let me know if it’d be helpful to have access to specific commits that caused the bug. I have noticed that sometimes clearing cache and retying the deploy is successful, but not always.

Thanks again!

Another update, @hillary.

I just updated Astro to the v1.0 beta and that seems to have done the trick! I’ll keep you posted if things change. Thanks for all the help up to this point! :smile:

1 Like