Netlify Dev crashing with memory arrays issue

Since switching my blog to Eleventy, I’ve noticed the netlify dev will crash, randomly, soon after I’ve started working locally. When it does, Eleventy is still up and running and I just connect to that port instead. The error is as follows:

Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2) compile with  -s ALLOW_MEM
ORY_GROWTH=1  which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTIN
G_MALLOC=0
Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2) compile with  -s ALLOW_MEM
ORY_GROWTH=1  which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTIN
G_MALLOC=0
abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2) compile with  -s AL
LOW_MEMORY_GROWTH=1  which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with  -s
ABORTING_MALLOC=0 ") at Error
    at jsStackTrace (/home/ray/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1070:13)
    at stackTrace (/home/ray/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1087:12)
    at abort (/home/ray/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:8415:44)
    at abortOnCannotGrowMemory (/home/ray/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:117
0:3)
    at enlargeMemory (/home/ray/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1175:3)
    at wasm-function[3745]:65
    at wasm-function[2919]:7190
    at wasm-function[3461]:32
    at wasm-function[2431]:289
    at wasm-function[2426]:1164

Any ideas?

Hey @cfjedimaster, Thanks for reporting this issue. This is a known issue caused by too many redirect rules. We have a fix for it in the works. Please hold on while we release it. https://github.com/netlify/cli/issues/709

A fix for this has been released in netlify-cli@2.42.0 . Please update and let us know if it is still an issue here: https://github.com/netlify/cli/issues/709

1 Like