Simultaneous fetches over 6 are being dropped instead of being queued.
Hi.
I'm doing multiple Http calls to external server via fetch(). It works locally. But anything over 6 on deployed version throws error instantly. Docs say that additional fetches should be automatically queued and executed when older ones get freed up.
I'm doing multiple Http calls to external server via fetch(). It works locally. But anything over 6 on deployed version throws error instantly. Docs say that additional fetches should be automatically queued and executed when older ones get freed up.
4 Replies
What's the error you're getting?
"Response closed due to connection limit"
How many calls are you making?
I've tested with 7, 10 and 30.
Even with 7 it throws error.
I'm still interested in having this solved
I found out that the error happens when trying to resolve
fetches in
Promise.all()
So with this code:
this won't work:
await Promise.all(promises).then(results2=>{results = results2})
but this code below works
Judging by time it takes working code to resolve, it
seems to be doing 6 fetches concurrently.
I think it might be error in how worker parses code for queing.
And promise.all seems to be omitted.