Monitoring and restarting Derby

A terminal window
A terminal window
It’s a crude but working hack; I’ve been spinning a similar script since the mid-90s (then monitoring the PPP connection that kept an entire dorm connected, very slowly, to the Internet). Bash script. Every hour (run via cron) it just checks the process list to see if the Derby instance is up and, if not, spawns a new screen session with the Derby instance running in the background. (Every hour is fine for this application, which only hits the database periodically. I’d tweak it to run in a constant loop if the Derby instance was more critical. I’d also question why I was running something critical on Derby in such a context, too.

Comments