Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

232
Visualizações
nginx 30 seconds 502 error timeout after proxy restart

I have many nodejs proxies running behind nginx, it has worked fine for years with 1 annoying exception.

When the nodejs process is restarted, the client receives a 502 error, which is OK, however nginx appears to continue refusing the connection for exactly 30 seconds, and then the connection is restored.

I need to reduce this down to a few seconds, I have seen other posts about increasing timeouts to overcome intermittent gateway errors, however this is different.

I have tried enabling keep-alive with:

  proxy_http_version 1.1;
  proxy_set_header Connection "";

But that has no effect.

Does anyone know which parameter is controlling this 30 second timeout ?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

OK, solved:

proxy_cache_valid 502 5s;

This appears to reduce the time that the server waits after a 502 error before restoring the connection.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda