-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels