Skip to content

Still receiving an H12 on Heroku.  #2

@jaycetan

Description

@jaycetan

Hello extraBacon,
Thank you for this library.

Your documentation indicates that this can be used for my exact use case. I have a Node server on Heroku in which sometimes requests can take anywhere from 3 seconds to 4.5 minutes.

I am applying this library to one of my routes but Heroku is still providing an H12 error. I don't see any additional errors in Node. Can you please tell me how I can correct my approach?

Below is my code to use the library on my submit route.

const submitController = require('./app/controllers/submitController.js');
const DelayedResponse = require('http-delayed-response');

app.post('/submit', (req, res, next) => {
  function slowfunction() {
    return submitController(req, res, next);
  }
  const delayed = new DelayedResponse(req, res, next);
  slowfunction(delayed.start(20 * 1000, 20 * 1000));
});

at=error code=H12 desc="Request timeout" method=POST path="/submit" host=test.herokuapp.com request_id=test fwd="70.165.36.139" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions