Is there any way to make requests to my server automatically time out (on the server) after X seconds?
I want to do this because on heroku requests time out after 30 seconds, and I don't want to waste server resources on computing responses in these cases. I also want to kill any db transactions that are open, so I don't change the database without the user getting a decent response.
I'm using HTTP-kit 2.3.0 and compojure 1.6.1.
(I know that having requests take this long is not best practice but this is for a backoffice project, and these things happen for instance when the DB becomes unreachable)