Skip to main content
Participant
June 16, 2008
Question

Cold Fusion MX 6

  • June 16, 2008
  • 2 replies
  • 371 views
My cf server keeps hanging and i would like to set up a process to automatically restart the cold fusion server if it hangs. Can anyone provide input?
    This topic has been closed for replies.

    2 replies

    Inspiring
    June 20, 2008
    _whitenoise_ wrote:
    > There's probably better ways of doing it...

    There are tools that do this, some are built into Windows I believe,
    others available for little or no cost. They will ping a resource and
    take the desired action if the resource does not respond. I don't know
    any off the top of my head since I have never experienced an unstable CF
    server like this, but I understand others have and have used tools like
    this.
    Known Participant
    June 20, 2008
    There's probably better ways of doing it, but off the top of my head I'd say you could have an app that calls a cfm page on your server. If it doesn't get the response it was after (or times out) then it writes to a shell script on that machine (or, I'm guessing, a bat file if you're using windows). The shell script is on a cron job (scheduler for windows?) and normally is blank, but your script writes in the cf restart command. Beause this is being called every 10 mins or so by cron it means that the next time it's run it restarts the cf server. You'll then need to change it back (otherwise your cf server will be being restarted every 10 minutes ad infinitum). Put your app on a cron job too, and once it detects that the cf server is back up it wipes the shell script.