Fork/exec /usr/local/bin/build: argument list too long

6:41:52 PM: Build ready to start
6:41:54 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
6:41:54 PM: build-image tag: v3.3.20
6:41:54 PM: buildbot version: be8ecf2af866e16fa4301cc5c14de2ccbbb21cf4
6:41:54 PM: Fetching cached dependencies
6:41:54 PM: Starting to download cache of 254.8KB
6:41:54 PM: Finished downloading cache in 111.456256ms
6:41:54 PM: Starting to extract cache
6:41:54 PM: Failed to fetch cache, continuing with build
6:41:54 PM: Starting to prepare the repo for build
6:41:54 PM: No cached dependencies found. Cloning fresh repo
6:41:54 PM: git clone https://github.com/beaverbuilder/documentation
6:41:58 PM: Preparing Git Reference refs/heads/master
6:42:04 PM: Starting build script
6:42:04 PM: Build command unable to start
6:42:04 PM: Error running command: fork/exec /usr/local/bin/build: argument list too long
6:42:04 PM: Failing build: Failed to build site
6:42:04 PM: Failed during stage 'building site': fork/exec /usr/local/bin/build: argument list too long
6:42:04 PM: Finished processing build request in 10.07241342s

Have tried to deploy 4 or 5 times, failed every time with this error. Was working fine 2 days ago, we have not changed anything apart from a bunch of redirects.
Account is angry-gates-bead98

hmm, can you share a screenshot of your build settings and your package.json please?

Shared with CloudApp

Its a public repo GitHub - beaverbuilder/documentation: Documentation for all Beaver Builder products.

Weve had to update our DNS back to our old domain as we have 700+ 404s that we just cant fix if we cant deploy anything!

Done some more testing @perry it seems our redirects are the issue. Perhaps we have too many?
file (renamed) is here https://github.com/beaverbuilder/documentation/blob/master/old_netlify.toml

The build succeeded without this file, is there a limit to the amount of redirects? Is there a better way to do this?
We have no way to do the redirects on helpscout, this is part of the reason we moved away from them, the limitations. I found nothing in your docs about any limitations and only an old forum post asking if there was a limit which got no real answer.
Help?

Heya! Perry pinged me for some help on this one. The limitation isn’t on “number of redirects” per se, it is on “total size of your site’s configuration”. Your redirects in particular are suuuuuuper long (lots of characters). A similar config file for smaller paths - for instance /a /b - could hold thousands more in the same amount of text.

If you could find a way to reduce their length - for instance, if you served ONLY kb.wpbeaverbuilder.com from that site - ALL of your from lines could change from:

“https://kb.wpbeaverbuilder.com/path”

to “/path” which is a pretty substantial byte savings!

Note that other things factor into that number as well:

  • number and length of enviroment variables and their title
  • if the build was triggered by non-git webhook (one of these: Build hooks | Netlify Docs), then it also includes the size of the incoming webhook POST’s body.

So - redirects are a part of it, but it is more about “total textual size” than total number. Yes, you could never have 1000000 redirects and fit into the size we need. But you are not trying to do that as far as I can tell :slight_smile:

Hmm…

Well we can only point the CNAME to either helpscout, or to netlify. What about if we pointed the kb subdomain to a different VPS and have nginx 301 it to netlify? pita but it might work?

Actually it looks like i overthought this!

I updated all those urls and repointed the CNAME and as far as I can tell its working now!

Thankyou so much!

1 Like

sweet! glad we could figure that out!

1 Like