Setting custom timeout time

I’m wondering if there is a way we can set the app to timeout and force a reset after 15 minutes. My application is hosted on Heroku.