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

234
Views
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
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!