-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: Maximum call stack size exceeded #93
Comments
Are there any solution to fix this ? |
same issue here! any known solution..? |
@0xmaayan Have you tried https://github.com/adobe/fetch ? import { fetch, reset } from '@adobe/fetch';
const main = async () => {
const args = process.argv.slice(2);
const N = args.length && !isNaN(parseInt(args[0])) ? parseInt(args[0]) : 100;
console.log(`running ${N} paralled requests...`)
const TEST_URL = 'https://httpbin.org/bytes/'; // HTTP2
// generete array of 'randomized' urls
const urls = Array.from({ length: N }, () => Math.floor(Math.random() * N)).map((num) => `${TEST_URL}${num}`);
const ts0 = Date.now();
// send requests
const responses = await Promise.all(urls.map((url) => fetch(url)));
// read bodies
await Promise.all(responses.map((resp) => resp.arrayBuffer()));
const ok = responses.filter((res) => res.ok);
if (ok.length !== N) {
console.log(`failed requests: ${N - ok.length}`);
}
const ts1 = Date.now();
console.log(`Elapsed time: ${ts1 - ts0} ms`);
}
main()
.catch(console.error)
.finally(reset); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running many (e.g. 1000) parallel requests to the same http2 origin causes:
To reproduce:
Run
node test.js 1000
test.js
The text was updated successfully, but these errors were encountered: