Restarting ColdFusion MX Programmatically (Revisited)

It was proposed on a CFTalk thread that one could CFEXECUTE a bat file on Windows to restart the ColdFusion MX Service by having the bat file first kill the jrun.exe processes then issue a NET START command to start the ColdFusion MX Service. The problem with this approach is that the bat file runs as a child process to the jrun.exe process. When the jrun process terminates, so does the bat file, leaving it unable to complete. Execution never gets beyond the kill jrun step.

A year and a half ago I proposed using the Windows AT scheduler service from CFML to schedule a restart of ColdFusion. The scheduler runs independently of the jrun.exe process and is not affected by a ColdFusion shutdown. Read more about it.

On Unix and Linux calling a shell script via CFEXECUTE to restart the ColdFusion server won't work because ColdFusion most often runs as a non-privileged user such as nobody. If you were to configure sudo access to start ColdFusion, then the non-privileged user would be able to perform the restart. This is of course a security risk, but no more so that that of Windows where ColdFusion usually runs as the privileged user System by default.

Wired Magazine on Motor Neurons From Embryonic Stem Cells

Wired Magazine has a brief overview of the importance of a new paper published in Nature Biotechnology. The significance of the article centers around how coaxing stem cells to grow into specific cell types is governed not only by their immediate chemical environment but also the transient nature of that environment. So its all about the timing of what chemical signals are presented to the stem cells.

Being able to focus stem cell growth towards a specific cell type enables scientists to generate new cells to replace damaged or deficient cells of the same type. In this case, the creation of motor neurons from stem cells is a big leap towards solving spinal cord injury.

A former acquaintance Ole Isacson, a Harvard Neuroscientist, comments on the research in the report.

A good review of the state of stem cell research can be found here: Stem Cells - Hype and Hope

CFMX 6.1 Updater 1 Connector Memory Leak w/ IIS SSL

Bug 55695 was introduced in the connector stub in Updater 1 for ColdFusion MX 6.1 server configuration, inducing uncontrolled memory growth in inetinfo.exe when using IIS and SSL enabled websites.

The bug is actually in the connector for JRun 4 Updater 3. CFMX 6.1 Updater 1 server configuration updates the underlying JRun 4 server to JRun 4 updater 3 and brings that connector version with it.

CFMX 6.1 Updater 1 does not change the JRun version if you're running the CFMX J2EE configuration with JRun, so Updater 1 does not introduce the problem there. In J2EE configuration you are responsible for managing the JRun server version as ColdFusion will not "take care of it" for you.

While the bug is fixed in JRun 4 Updater 4 (release notes), you cannot install JR4 Updater 4 to the underlying JRun server when using CFMX in server configuration. This means that you'll need a hotfix, currently only available by contacting Macromedia Support. The hotfix is just a replacement jrun.dll, so you would have to stop IIS, back up the old jrun.dll in $CFMX_HOME/runtime/lib/wsconfig/{1}/jrun.dll and then swap in the new one.


If your ColdFusion MX server suddenly starts sending pages that display only <. or sometimes .< in the browser, then ColdFusion, or JRun actually, is actually trying to tell you is that an internal server error has occured.

This is a connector bug in CFMX 6.1 Updater 1, recently uncovered by the detective work of my colleague Tom D.

I've heard of some rare reports of this occurring, but I haven't seen any clear explanations of what caused it.

It turns out that the connector was just trying to return a message for "Internal Error" wrapped in some formatting HTML, but due to a connector glitch it just wrote some repeated HTML tags with a dangling bracket and period. If you view source you'll see the pointless HTML tags just hanging around.

So in the end there's no real mystery to it, other than just trying to find out what's causing the internal error on JRun, but that's another story.

Keep Library Loaded - Check this box to retain the library in RAM

I just worked a case where a ColdFusion MX 6.1 server was restarting over and over again every 1-5 minutes with virtually no helpful information in any of the ColdFusion, JRun, Webserver, or Windows Event logs, and there wasn't a HotSpot crash log anywhere.

The app was being tested in staging using the Microsoft Web Stress Tool, which will just hammer one or more designated pages. Running a brief stress test on an isolated test page having only "hello world" did not cause the CFMX server to restart, running the test on the application's main index.cfm easily crashed the server.

The app was loaded onto another CFMX server and the CFAdmin was adjusted for the CFX tags and the datasources. The same stress test did not crash the CFMX server here. A detailed comparison of the two servers and the two CF Admins was made, and it was noticed that the crashing server did not have the checkbox enabled to keep the C++ CFX tag loaded in memory, whereas the stable server was checked.

On the detail view for "Add/Edit C++ CFX Tag" the checkbox can be found, labelled as "Keep Library Loaded - Check this box to retain the library in RAM". Once this box was enabled on the crashing server it immediately became stable. The particular CFX tag was the popular CFX_IMAGE. Having to load an unload the CFX into memory for every request was demonstrated to crash the server while leaving very little evidence in its wake.

Runtime service is not available

I've run into another case of the ColdFusion server not starting up properly due to a empty file, previously blogged here.

It would be a good precaution to back up $CFMX_HOME/lib/ and neo-query.xml because those files have been the ones to go AWOL on very rare occassions.

unexpected constant #35 -1

If you have a ColdFusion template having more than 66kb of text outside of the CFML tags then you might run into bug 54007. The result will be that the page will not compile on CFMX 6.x and the result will be a error and stack trace similar to the following:

unexpected constant #35 -1

java.lang.IllegalStateException: unexpected constant #35 -1
at coldfusion.compiler.ClassReader.readCpool(
at coldfusion.compiler.ClassReader.getClassName(
at coldfusion.runtime.TemplateClassLoader.findClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at coldfusion.runtime.TemplateClassLoader$1.fetch(
at coldfusion.util.LruCache.get(
at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(

For example, if you had a template that containing nothing other than "0123456789" repeated over and over until the file was greater than 66kb, then you would see the error.

To work around it, divide the template into sub-templates where each one has less than 66kb of text, then CFINCLUDE it from a parent template.

Announcing FUDCon 1

The Fedora Project, a Red-Hat sponsored and community supported open source project, will be holding its first Fedora Users and Developers Conference, FUDCon 1, in Cambridge, Massachusetts on Friday, February 18th, 2005. Attendance will be free.

Among the sessions to be offered:

* Fedora on Sparc, PPC, and other platforms by Tom 'Spot' Callaway and Colin Charles
* Xen Fedora: A look at virtualization for Fedora by Jeremy Katz
* SELinux in Fedora Core 4 by Dan Walsh
* Stateless Linux by Havoc Pennington

Plans for this event are still evolving, but a preliminary schedule of events has been established. This schedule and other up-to-the-minute information about the conference can be found at