Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
Promise.all produced "throttle queue is over max capacity"

When running this code, I get "trottle queue is over max capacity" error and I dont know how to get this to work.

The function that gets called for the service itself is an async function call to a 3rd party API. I could not find any implementation that works for my example and hope to find someone to explain me what is happening here.

Thank you

async analyze() {
    const markets = Object.values(this.service.getMarkets()).filter(
      (m) => this.markets.includes(m.quoteId) && m.active
    );
    const tasks = [];

    for (let i = 0; i < markets.length; i++) {
      //market iteration
      const symbol = markets[i].symbol;

      for (let j = 0; j < this.timeframes.length; j++) {
        //timeframe iteration
        const timeframe = this.timeframes[j];
        tasks.push(this.service.getOHLCV(symbol, timeframe));
      }
    }

    console.log("Tasks to be executed", tasks.length);

    const startTime = Date.now();
    const ohlcvDatasets = await Promise.all(tasks);
    const endTime = Date.now() - startTime;

    console.log(`executed ${tasks.length} tasks in ${endTime} ms`);
    
    this.analyzeRSI(ohlcvDatasets);
  }

this.service.getOHLCV() returns a Promise. The function in the service class makes use of a 3rd party library which calls an external API.

Like so.

getOHLCV(){ return 3rdPartyAPICall }

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!