Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Stop CF running when windows starts?

Contributor ,
Oct 31, 2009 Oct 31, 2009

Hi,

I'm using the developer edition of CF8 to work and test locally on WinXP, but don't want ColdFusion server to run when windows starts as I only work on it about once a week, and jrun.exe (which I believe is the coldfusion process) adds quite a bit to my bootup time and eats some system resources.

So, I was thinking I'd disable any references to ColdFusion in my MSCONFIG settings, but then I need a quick easy way of launching them all when I want to use the server.

Can anyone suggest a way to set it up this way so ColdFusion only loads when I want to use it?

Thanks in advance.
T

2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 31, 2009 Oct 31, 2009

Set it's Windows service to be manual start.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2009 Nov 01, 2009
Set it's Windows service to be manual start.

And then you can use the following trick to prevent you from having to open the Windows service whenever you wish to manually start Coldfusion.

1) Store the following line of scripting code as the file invis.vbs in C:\ColdFusion8\bin\. Its purpose is to start a batch file invisibly, that is, without keeping the DOS screen open.

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

2) Store the following line of scripting code as the batch file launch_CF8.bat in C:\ColdFusion8\bin\. Its purpose is to start Coldfusion invisibly.

wscript.exe "C:\Coldfusion8\bin\invis.vbs" "cfstart.bat"

3) In the directory C:\ColdFusion8\bin\, right-click on the file launch_CF8.bat. Create a short-cut on the desktop. In the same directory, also right-click on the file cfstop.bat, and create a short-cut for it on the desktop.

That's it. Done. From now on, you only have to double-click on the link launch_CF8.bat on your dsektop to start Coldfusion, and on the link cfstop.bat to stop it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 01, 2009 Nov 01, 2009
And then you can use the following trick to prevent you from having to open the Windows service whenever you wish to manually start Coldfusion.

That seems like a lot of hoops to jump through when one just needs to go NET START [name of CF service here].

Or am I missing something?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2009 Nov 02, 2009

That seems like a lot of hoops to jump through when one just needs to go NET START [name of CF service here].

Or am I missing something?

I prefer a double-click to NET START [name of CF service here].

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 02, 2009 Nov 02, 2009

Right.  So put it in a batch file and stick a shortcut to the batch file in your start menu / quick launch / desktop.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2009 Nov 02, 2009
So put it in a batch file and stick a shortcut to the batch file in your start menu / quick launch / desktop.

Yes, that's the idea.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 02, 2009 Nov 02, 2009
So put it in a batch file and stick a shortcut to the batch file in your start menu / quick launch / desktop.

Yes, that's the idea.

Ah, right: gotcha.  I read your post more closely (rather than just going "all those steps to start CF?  Jeez!", and see that most of it is to make the black box not come up when running the batch file.  Fair enough.

I don't have a cfstart.bat or cfstop.bat on my install (mutli-server, EAR installs).  Are those vagaries of the standard installation?  What's in them?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 05, 2009 Nov 05, 2009

Thanks for the detailed reply, BKBK. That works as you described, but my WAMP server now seems to run very slowly when accessing localhost. Any idea what could cause that? As soon as I start the ColdFusion server, it's fine...

I use WAMP quite a lot so was hoping to be able to run that and only load ColdFusion when I needed it.

Thanks for all your help.

T

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2009 Nov 06, 2009
my WAMP server now seems to run very slowly

The usual causes are:

1) Firewall and/or an antivirus software running in the background. What happens when you switch these off?

2) Your choice of browser. Firefox plugins are known to slow down WAMP servers. What happens when you use the lightweight Chrome browser?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 07, 2009 Nov 07, 2009

Turning off my firewall/antivirus doesn't seem to help. I've tried in IE6, FF3 and Chrome - all the same...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 06, 2009 Nov 06, 2009

How slow is very slow? 15 seconds per request? 30?

When this happens it usually means that the connector that connects the webserver to the CF server intercepts a request and tries to forward it to CF, but can't reach CF. What may help is shup down the webserver, start CF, start the webserver, do a few requests, then shut down CF. That way the connector as cached the config and can determine which requests it does not need to forward.

The other thing to check is that localhost resolves properly in your hosts file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2009 Nov 06, 2009
When this happens it usually means that the connector that connects the
webserver to the CF server intercepts a request and tries to forward it
to CF, but can't reach CF.

Huh? Tripplesub says, "As soon as I start the Coldfusion server, it's fine"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 06, 2009 Nov 06, 2009

Exactly. The webserver connector, which is a shared library loaded into the webserver, needs some configuration from ColdFusion. So the webserver connector tries to connect to ColdFusion to load that configuratio data, but doesn't get a response. Then after X seconds the connecto gives up and normal processing in the webserver resumes. As soon as CF is started the webserver connector can load the configuration data so then requests are fast.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 07, 2009 Nov 07, 2009

Exactly as you said. If I start then stop CF, the webserver is fixed.

So, thanks, I can do it that way, but it looks like in order to do what I originally wanted wanted, I'll now have to make a bat file that starts CF, starts WAMP, then stops CF? I would like my machine to boot up with neither running (so I have set all of the CF services to 'manual start' in Administritive tools), then be able to start WAMP server separatly from CF server as I need.

Thanks everyone for contributing so much!

T

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 08, 2009 Nov 08, 2009
LATEST

Do you need Apache when you work with ColdFusion? ColdFusion has a built-in webserver that, while not industrial strength, server pretty well for development. Why not just disconnect ColdFusion and Apache, put your HTML projects in Apache and your ColdFusion projects in ColdFusion?

If you do need Apache you should have a look at setting up virtual hosts. Only connect the virtual hosts where you are using ColdFusion to the ColdFusion server and use virtual hosts that are not connected for your HTML projects.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources