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

244
Visualizações
H27 error thrown when sending response back to client

I think this is probably a fairly simple fix, even though it's a lot of code...when the user starts loading into the app, it essentially sends a request to the server that calls a bunch of different APIs and sub functions, then returns some data queried from a Postgres table to the user. For some reason, About 40% of the time, I'm getting an H27 error thrown when the response is sent back to the user. The logs look like this:

2022-07-18T01:46:36.443368+00:00 app[web.1]: User is attempting to sign in
2022-07-18T01:46:36.443386+00:00 app[web.1]: Started processing
2022-07-18T01:46:36.883171+00:00 app[web.1]: Signing in from X,Y
2022-07-18T01:46:38.662059+00:00 app[web.1]: API Call 1,2,and 3
2022-07-18T01:46:40.416057+00:00 app[web.1]: API Call 4
2022-07-18T01:46:40.932732+00:00 app[web.1]: API Call 5
2022-07-18T01:46:40.949921+00:00 app[web.1]: API Call 6
2022-07-18T01:46:44.683997+00:00 app[web.1]: finished processing
2022-07-18T01:46:44.684014+00:00 app[web.1]: Sending 110 results back to the client
2022-07-18T01:46:44.694904+00:00 heroku[router]: sock=client at=warning code=H27 desc="Client Request Interrupted" method=POST path="/userLoadingInToApp" host=app-name.herokuapp.com request_id=11caaa97-4b27-431e-84bd-e8b82162877f fwd="xxx.xxx.xxx.xx" dyno=web.1 connect=0ms service=8343ms status=499 bytes= protocol=https

I print out 'Sending x results back to the client' RIGHT before sending the results back to the client, so because the H27 error is thrown after that, it only makes sense there is an error being thrown when trying to send response back to the client:

app.post('/userLoadingInToApp', async function (request, response) {
  let results = await start(request) // All the calculations, database queries, api calls, console.logging etc are done inside this container function.
  console.log(`Sending ${results.length} back to the client`)
  response.send(results)
})

Often, the response is returned fine to the client, so not sure what's going on here...

about 4 years ago · Santiago Gelvez
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