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

142
Views
NodeJS - timeout on large file download

I am trying to download a fairly large file (500MB) from an NodeJS API endpoint, but the following code appears times out with a 504 Gateway Timeout:

  async download(res: Response) {
    const path = `${this.EXCEL_SAVE_DIR}/report.xlsx`;
    try {
      if (fs.existsSync(path)) {
        res.download(path);
      } else {
        logger.debug(`download -> file not found at: ${path} `);
      }
    } catch (err) {
      logger.debug(`download -> error: ${JSON.stringify(err)}`);
    }
  }

Is it possible to avoid these timeouts?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout

Increase proxy time out in Nginx

proxy_read_timeout 600s;

about 4 years ago · Juan Pablo Isaza Report
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!