question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eachSeries - stack size limitation

See original GitHub issue

var arr = [];
for (var i=0; i <= 5000; i++ ) {
    arr.push( i );
}
async.eachSeries(arr, function (i, cb){
    cb();
});

RangeError: Maximum call stack size exceeded

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
aearlycommented, Jan 12, 2015

See #66, #75, #110, #117, #133, #296, #413, #510, #573, #588, #590, #604, #622, #696 .

Your iterator is synchronous. You need to:

async.eachSeries(arr, function (i, cb){
    setImmediate(cb);
});
0reactions
wilyworkcommented, Nov 18, 2016

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Async.eachSeries gives me an rangeerror: maximum call ...
To help you, Just put a : //counter++; console.log("next"); // to avoid Maximum call stack size exceeded error setImmediate(()=>{ ...
Read more >
Fixing "Maximum call stack size exceeded" in async Node.js ...
eachSeries creates a new level of stack recursion each time next() is called. Whoops. With a large enough array that will inevitably exceed...
Read more >
Default maximum stack size of a thread - Microsoft Learn
In Windows Server 2008 and higher, the maximum stack size of a thread running on 32-bit version of IIS is 256 KB, and...
Read more >
JavaScript stack size - Gleb Bahmutov
A number in JavaScript takes up 8 bytes, this allows us to calculate the maximum stack size and the size of each frame...
Read more >
Uncaught RangeError: Maximum call stack size exceeded
Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found