ColdFusion

Not much has changed since ColdFusion 10: How to configure data sources with Microsoft JDBC Driver 4.0 for SQL Server, but a small detail is now required to connect to your existing MsSQL Servers.

This article explains how you are able to use the Microsoft JDBC Driver for SQL Server under ColdFusion. The background why you should do this is the bug Macromedia database drivers leaking memory. This is a very serious bug as you can see in the linked article. Your servers will be very unstable if you run with the Adobe build in drivers for Microsoft SQL. Until today we have not found any single issue at all with the replaced drivers. It is really a drop in replacement without any side effect.

You may be in the situation that ColdFusion services are not starting up and a manual startup yields no useful information, too. It simply failed after it tries to startup the services for a very long time. If services are starting up it may takes an extreme long time to start.

Start-Service : Failed to start service 'ColdFusion 10 Application Server cfusion (ColdFusion 10 Application Server cfusion)'.
At line:1 char:1
+ Start-Service Cold*
+ ~~~~~~~~~~~~~~~~~~~
   + CategoryInfo  : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
  ServiceCommandException
   + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

Background:

There are for sure more possible situation that may cause a ColdFusion startup failure, but if you have not changed anything and only rebooted/restarted your server/coldfusion after some OS updates and ColdFusion is now failing to start without having anything changed in ColdFusion you should check this issue very first. From my point of view this issue here is the most common issue that everyone will experience sooner or later.

Over the course of several months we identified some date/time issues that also exist in CF10 and CF11. In CF10 and CF11 there are still more inconsistency issues like in CF2016. Some of the date/time formatter and parser issues have been fixed in CF2016 RTM, but it was still a mess and the functions are not behaving as expected in many cases. We are still in discussion about incorrect IsNumericDate() results not listed below. Please also see ColdFusion 2016: Upcoming new IsDateObject() function that was a result of the issues we faced with below bugs.

Notable changes are:

The functions IsDate() / LSIsDate()ParseDateTime()LSIsDate() require that you provide a string to these functions. However these functions do not throw an exception if you provide a date/time object. Not only this - they return inconsistent results if you use an object - often it works, but not always. So you may feel like the function allows an object as param and you learn later the hard way that your code is not always behaving properly. The bad about this issue is that there exists no function that allows you to check if you have a valid ColdFusion date/time object or just a date/time string.

For an extended time we are trying to install Windows Updates on our machines, but this always fails with error message Failure configuring Windows Updates. Reverting changes when the system reboots. In case all the update rolling back and you are back to no update installed. This happens typically if you install Windows 2012 Core from DVD and try to install all the available Microsoft hotfixes. After a few months with Microsoft this has been escalated MS internally and they identified coldfusion.exe has an open file handle on TTF font files. It looks like Microsoft does not add the TTFs to pending files for rename list and just replace them on reboot from my point of view.

After lot of digging we found an interfering process that causes an update failure of tahomabd.ttf, see C:\Windows\Logs\CBS\CBS.log on the affected machine:

If you are using CFCONTENT with images or PDFs you will run into serious troubles with ColdFusion 10 Updater 14. These updater contains an upgrade of the IIS connector and will break your websites. This is known to be an issue with ColdFusion 11 and ColdFusion 10. The bug has been logged with Adobe as coldfusion 10 update 14. failed to load pdf document, but the issue goes far beyond PDFs.

Symptoms:

  • An URL use CFCONTENT tag to output a PDF or an image to the browser. If you have URL parameters attached to this URL it will fail to download.
  • Wireshark traces show that no binary data is send to the web browser. You only see a GET and some headers, but no content.

Workarounds:

  1. Replace Updater 14 connector DLL C:\ColdFusion10\config\wsconfig\[ID]\isapi_redirect.dll with the connector DLL from Updater 12.
  2. Uninstall CF 10 Updater 14

Repro case:

If you are using file based EHCache in Coldfusion you will run into serious troubles with ColdFusion 10 Updater 14 and your application goes down. You can find this case in bugtracker #3858286: CacheManager has been shut down error with Update 14. These updater contains an upgrade of EHCache library from version 2.5.1 to 2.6.6 to fix the bug #3339491: Upgrading Ehcache causes silent failure and unexpected behavior. You may have also seen that EHCache 2.6.6 is not available on EHCache download pages, but I do not know why yet. I guess it is sooo unstable that these version may has been removed.

Symptoms:

  • The CacheManager has been shut down. It can no longer be used.

Workarounds:

This article explains how you are able to use the Microsoft JDBC Driver 4.0 for SQL Server under ColdFusion. The background why you should do this is the bug Macromedia database drivers leaking memory. This is a very serious bug as you can see in the linked article. Your servers will be very unstable if you run with the Adobe build in drivers for Microsoft SQL. Until today we have not found any single issue at all with the replaced drivers. It is really a drop in replacement without any side effect.

If you encode your structs or arrays to JSON in ColdFusion 10 you may see some strange and unexpected results happen. The reason is that ColdFusion is a type-less language and don't know anything about the type of a variable. This means all your variables are strings very first. But you need to have valid values for boolean or integers or floats.

ColdFusion cannot do this for you out of the box by today. What ColdFusion does is really stupid and causes a lot of unexpected troubles as CF has no idea about the variable type. It simply tries to find out what type of variable the value may be and converts it to these type. As always with automatism's they must and will fail! The problems you may face are the following:

There exists one or more webservice bugs in ColdFusion 10 that will leak all your memory over a very short amount of time. We build a SOAP based webservice with ColdFusion 8 + 10 that is not running stable at all for around 2 years now. First the issues we have seen in CF8 have been caused by the very outdated Axis 1.x version used under the hood, but later in CF10 Axis 2 was integrated and the issues should have been resolved by upgrading the Applications to this version. But SOAP is still a mess under ColdFusion 10 and very very unstable! We are in month 9 with CF10 analysis and gave up with useless Adobe Support.

We migrated our webservice to JSON output format now. Nothing else in the logic has been changed, only the output. The memory leak disappeared with JSON and the webservice runs smooth for several weeks now. Nothing has been changed on server configuration.