Error enqueueing build

Hey! I’m having build issues with my site at prideam.netlify.app. Whenever a deploy is triggered by the webhook from our craft CMS it always fails immediately. This is the deploy log every time:

10:38:55 AM: Build ready to start
10:38:55 AM: Error enqueueing build.

I’m having a hard time figuring out what causes this. Any help is appreciated!

Thanks!

hi there, is this still occurring? Are you able to deploy via another method or are all deploys failing?

if you could link us to a failed deploy that would also be helpful. thanks!

Manual deploys and deploys triggered by branch updates work fine. Only deploys from CMS updates are giving me this error.

Here’s a link to a recent CMS update deploy: Netlify App

wow, that is a very helpful error message on our part :expressionless: /s

I’ll see who I can go ask questions about this. i will probably need to go talk to the backend team, so it may be a few days, but i’ll keep you posted.

can you share your build settings and tell me a little more about which CMS you are using?

We’re using craft cms with the webhook plugin. Strange thing is we’ve used it successfully on another Netlify project before, and the webhook even worked on this one successfully until recently.

For our build settings we only have one build hook which craft is using. We also have a deploy context for one of our branches which is working fine. Besides those and a few environment variables everything is standard. Our build command is also the standard “gatsby build”

can you share your package.json please?

and, just to be sure, you tried “clear cache and redeploy” after updating your dependencies?

{
  "name": "gatsby-starter-default",
  "private": true,
  "description": "A simple starter to get up and developing quickly with Gatsby",
  "version": "0.1.0",
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
  "dependencies": {
    "algoliasearch": "^4.2.0",
    "bootstrap": "^4.5.0",
    "bootstrap-breakpoints": "^1.0.0",
    "env-cmd": "^10.1.0",
    "gatsby": "^2.23.11",
    "gatsby-background-image": "^1.1.1",
    "gatsby-image": "^2.4.4",
    "gatsby-plugin-algolia": "^0.11.1",
    "gatsby-plugin-bugherd": "^1.0.2",
    "gatsby-plugin-google-analytics": "^2.3.14",
    "gatsby-plugin-mailchimp": "^5.2.2",
    "gatsby-plugin-manifest": "^2.4.5",
    "gatsby-plugin-offline": "^3.2.3",
    "gatsby-plugin-react-helmet": "^3.3.1",
    "gatsby-plugin-remote-images": "^2.1.0",
    "gatsby-plugin-sass": "^2.3.2",
    "gatsby-plugin-sharp": "^2.6.4",
    "gatsby-source-filesystem": "^2.3.4",
    "gatsby-source-graphql": "^2.5.2",
    "gatsby-transformer-sharp": "^2.5.2",
    "node-sass": "^4.14.1",
    "prop-types": "^15.7.2",
    "react": "^16.12.0",
    "react-animation-components": "^3.0.0",
    "react-bootstrap": "^1.0.1",
    "react-dom": "^16.12.0",
    "react-helmet": "^6.0.0",
    "react-instantsearch-dom": "^6.5.0",
    "react-reveal": "^1.2.2",
    "react-scrollmagic": "^2.2.0",
    "react-share": "^4.2.0",
    "react-text-fun": "^1.0.0",
    "react-ticker": "^1.2.2",
    "react-timeout": "^1.2.0",
    "react-transition-group": "^4.4.1",
    "striptags": "^3.1.1",
    "styled-components": "^5.1.1",
    "three": "^0.118.3"
  },
  "devDependencies": {
    "prettier": "2.0.5"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "netlify": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages",
    "algolia": "env-cmd -f .env gatsby build",
    "develop": "env-cmd -f .env gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,json,md}\"",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

Yep! I’ve tried clearing the cache several times.

Hi, @awageh. The size of the payload the webhook is sending is the root cause. This is the error from our backend systems:

Error enqueueing build. Build payload exceeded limit of 140 KB. Please make sure environment variables and/or webhook body don't exceed this size.

As this only happens for the webhook, I would recommend checking there to see how big the size of the request body is and working to keep it under the limit. Note, the limit is the combination of the environment variables and the webhook body so the full 140 KB may not be available for the webhook.

​Please let us know if there are other questions about this.

1 Like

Thank you! Enabling the “Send a custom payload” in the craft webhook plugin solved this issue for us.

2 Likes

I am getting this same error (“Error enqueueing build.”) whenever I send a post request from builder.io CMS to the Netlify-provided Build Hook. I’m assuming that is because the size of the payload the webhook is sending from builder.io is above 140kb.

What’s strange though is that after the failed post request via the webhook occurs, when I click “Trigger deploy” & “Deploy site” from within Netlify, it deplys fine, with the changes made on the builder.io CMS incorporated without a problem.

Is there a way that I can avoid this error? Should I change any configurations in my Netlify Site Settings? Thanks!

Hi @Matt1,

As @luke mentioned above, you’d have to keep your payload within that size, there is probably no other way.

I assume it deploys fine later because it fetches the data from CMS which is not limited by payload size.

I’ll talk with builder.io and see if they can do anything about that. Thanks.