I've got a simple Clojure web application based on ring, compojure and enlive.
I run it on a linux VPS with the following command:
nohup lein trampoline run -m <application-name>.routes &
From time to time it crashes and I haven't quite diagnosed why yet.
Until I've figured out the cause, I have to periodically check whether the website is online, and if it's not, manually restart it. I'd prefer it if the website could automatically restart if it goes down. What is the best way of doing this? Is this even a sensible thing to do?
I was looking into using Immutant (http://immutant.org/) because at first glance it looked like it might be helpful, but on closer inspection I couldn't understand what it did or whether it was relevant.