Professional Web Applications Themes

Is it possible to restart CF service remotely - Coldfusion Server Administration

We have a test server with the following config: Windows 2003 server sp1 Apache 1.3.34 MS-SQL 2000 sp4 ColdFusion MX7 hotfix3 ArcServe 2000 Since we do a lot of testing of suspect code on this server, CF hangs and becomes unresponsive on a regular basis. Is there a command we can execute to restart the CF server remotely? I realize that this would probably not be a CF command because the CF server is already hung, but is there a way to do it using the command line or setting up some type of web page with a RESTART button ...

  1. #1

    Default Is it possible to restart CF service remotely

    We have a test server with the following config:

    Windows 2003 server sp1
    Apache 1.3.34
    MS-SQL 2000 sp4
    ColdFusion MX7 hotfix3
    ArcServe 2000

    Since we do a lot of testing of suspect code on this server, CF hangs and
    becomes unresponsive on a regular basis. Is there a command we can execute to
    restart the CF server remotely? I realize that this would probably not be a CF
    command because the CF server is already hung, but is there a way to do it
    using the command line or setting up some type of web page with a RESTART
    button on it?

    Thanks for any help in advance!

    Scott

    a00oo00a Guest

  2. #2

    Default Re: Is it possible to restart CF service remotely

    First, you should really be troubleshooting why the server is hanging by taking
    thread dumps from the time the server hangs, a few in a row in fact, and then
    look at them to figure out what's causing the hang, then go fix that.

    This is not an easy process to do if you're new to CF thread dumps, but much
    has been written on the topic.

    To begin, you can check out my blog topics on troubleshooting CFMX that
    mention thread dumps:
    [url]http://www.talkingtree.com/blog/index.cfm/2003/8/5/RestartCFMX[/url]

    However, realize that if all the (jrpp) threads that handle HTTP requests thru
    Apache are hung, then you won't be able to make a request to run this script.
    You could instead turn on the the built-in webserver and restrict the interface
    to an internal IP or localhost so that the public can't access the built-in
    webserver, and then call the restart script that way. The built-in webserver
    uses a different thread pool than the threads that come to CF from Apache.
    This way you can get that request to run even if it looks hung to the public.

    serat Guest

  3. #3

    Default Re: Is it possible to restart CF service remotely

    How remote?
    Personally I like Remote Desktop (Terminal services) for that kind of stuff.
    Some version fo the command line
    c:\cfusiomx7\runtime\bin\jrunsvc (see --help for parameters)
    should allow a shutdown and restart.



    Greg Campbell Guest

  4. #4

    Default Re: Is it possible to restart CF service remotely

    You can start and stop any Winodws service with the "net stop" and "net start" commands. For example:

    net stop ColdFusion Application Server && net start ColdFusion Application Server
    ke4pym Guest

  5. #5

    Default Re: Is it possible to restart CF service remotely

    That is exactly what my programmatic means of restarting CF does. It creates
    two cron jobs (AT jobs actually) that stop the server and then start it. They
    have to be done as OS jobs since once CF commits hari kari it cannot run a page
    to start itself back.

    If you enable the built-in webserver and restrict to an internal IP, then you
    can have a probe that pings a cfm page through the public interface, then when
    the probe fails, make and internal HTTP call to the built-in webserver to a
    page that will run the programmatic restart. This can all be automated and
    wouldn't require a sysadmin be awake at 4am or whenever.

    serat Guest

  6. #6

    Default Re: Is it possible to restart CF service remotely

    Hey Steven, now that you have updated your signature, it is time to change your icon to the Adobe logo. :-)
    tclaremont Guest

Similar Threads

  1. Replies: 2
    Last Post: May 27th, 12:50 PM
  2. How to Restart Cold Fusion Remotely
    By BretHobbs in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: May 22nd, 07:30 AM
  3. Cannot connect to a web service or remotely
    By JerryK in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 26th, 04:30 AM
  4. simulate post of .htm page to remotely hosted web-service
    By John A Grandy in forum ASP.NET Web Services
    Replies: 0
    Last Post: August 25th, 09:52 PM
  5. remotely testing a web service
    By Matthew David in forum ASP.NET Web Services
    Replies: 1
    Last Post: August 18th, 12:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139