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

209
Views
What are the side effects of a large Keep-Alive in NODEJS

We've experienced 502 (BAD GATEWAY) on load tests due to the following settings in Express:

const app = express();
const server = app.listen(port);
server.keepAliveTimeout = 61 * 1000;
server.headersTimeout = 65 * 1000;

I've changed them to

const app = express();
const server = app.listen(port);
server.keepAliveTimeout = 120 * 1000;
server.headersTimeout = 125 * 1000;

And ever since the 502 (BAD GATEWAY) disappeared.

What are the consequences and side effects of a large KeepAlive ,assuming that I plan to support more Users Per Second in the future (at the moment around 30 U/S) ?

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

0

handling each request takes time, so when you send a heavy load on your server, your server keep your requests in memory and process each request in queue so, when your sever process fast it could empty the queue and memory as soon as possible but when it takes time, request reach timeout so when you increase the time out your server when trying to empty queue and memory look at time out and if a timeout occurred send 5XX error, and answer to your question, increasing the value of timeout don't increase request per second of your server

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!