Nginx is a high-performance and open-source web server that is widely used in the web communityIt can now be configured with ColdFusion 2016. With this post we are making available the prerelease build of the web-server connector for testing purposes. 

The prerelese build is in the form of an Linux 64-bit installer that packages the following 2 components:

- The Nginx web server installer. This installer is a variant of the standard Nginx installer that packages the AJP modules that enbable the communication between the webserver and ColdFusion.

- WSconfig.jar. This is a modified version of the library present in ColdFusion's <cf_root>/cfusion/lib directory, that is required by the WSConfig tool when configuring a web server connector. 

For detailed instructions on installing the webserver and configuring the connector, refer this document.  

We will look forward to your suggestions and feedback.


This blog post talks about a few scenarios related to connector misconfiguration and ways to handle them. The most common scenarios discussed in this article are

  • Connectors that are created for ALL and individual websites at the same time.
  • Multiple attempts to add/remove the connectors during configuration.

As a best practice, remove the connector using the WSCONFIG utility. Once the connectors are removed, verify that there are no residual files/settings/configuration remains, using the steps mentioned below. (WSCONFIG Utility location: \ColdFusion\<instance>\runtime\bin)

Consider a scenario where, upon launching the WSCONFIG utility, you see the following dialog box:

In this scenario, configuration conflict might occur, since the same connector is created for both ALL and individual website (for this case).

Follow the below steps to fix the connector misconfiguration:

  1. Remove both the connectors one by one, as shown in the below image. Select the connector and click “Remove”.

  1. In the dialog below, click “Yes” to continue.

  1. You can see that the first connector is now removed.

  1. Repeat the process for the other connectors. In this scenario, there are only two connectors.
  2. Launch IIS Manager.
  3. Click on any website (in this case, CF11) and double-click Handler Mappings.



  1. Manually remove all the ColdFusion handlers as shown below (if present):


  1. Navigate to “CF11” website and double-click ISAPI Filters.



  1. Remove “tomcat” entries (if any), as shown below:


  1. Repeat steps “-6-” to “-9-”, for all the sites with duplicate or corrupted connector settings.
  1. Navigate to the IIS Server home and double-click Handler Mappings.



  1. Remove all ColdFusion handler entries (if any), as shown below:


  1. Navigate to IIS Server and double-click on ISAPI Filters



  1. Remove entries for tomcat if any as shown below:



  1. Navigate to IIS Server and double-click ISAPI & CGI Restrictions.


  1. Remove all entries of tomcat as shown below:


  1. Once all the above entries have been verified and removed, launch the command prompt as Administrator (or with elevated privileges) and run IISRESET.

  1. Run the WSCONFIG utility to recreate the connector and test your website


Today, APIs are widely used and are very popular in the developer community. APIs make work easier, as developers can perform difficult task programmatically and automate repeatable routines.

In ColdFusion, there are Admin APIs available through which developers can add, modify, and delete Admin task programmatically. This is helpful for developers who do not have access to ColdFusion Administrator, for example, component event gateway, data sources, mail, and so on.

To access the components, use the below link, RDS needs to be enabled.

    http://{ip address}:<port>/CFIDE/adminapi/


How to enable RDS in ColdFusion Administrator

  • Login to ColdFusion Administrator>Security>RDS

















Let us see how the Data Sources can be added in ColdFusion Administrator using the Data Sources Admin API. You can use the syntax to add and modify the Data Sources without affecting the other admin settings. There are multiple attributes that can be used to add the DB which are supported in ColdFusion. For attribute details, please refer to this doc:

We will discuss about Microsoft SQL server and Oracle (RAC) with Macromedia driver and Thin drivers. Before that, let us take a look into the Data Source Management for ColdFusion, where users can add parameters.


Data Source Management for ColdFusion

This document has all the components which user can define create database connection using Admin API. Please refer to the link below


Using Macromedia driver MSSQL

ColdFusion provides MSSQL driver in both Standard and Enterprise editions. This example is with Macromedia drivers:

See the sample script below:


    // Login is always required. This example uses two lines of code.

    adminObj = createObject("component","cfide.adminapi.administrator");

    adminObj.login("PASSWORD");  //CF admin password.

    // Instantiate the data source object.

    myObj = createObject("component","cfide.adminapi.Data Sources");

    // Create a DSN.





        login_timeout = "29",

        timeout = "23",

        interval = 6,

        buffer = "64000",

        blob_buffer = "64000",

        setStringParameterAsUnicode = "false",

        description = "JD",

        pooling = true,

        maxpooledstatements = 999,

        enableMaxConnections = "true",

        maxConnections = "299",

        disable_clob = true,

        disable_blob = true,

        disable = false,

        storedProc = true,

        alter = false,

        grant = true,

        select = true,

        update = true,

        create = true,

        delete = true,

        drop = false,

        revoke = false );



Using Macromedia driver MSSQL when using OTHER as driver

Copy the MSSQL driver in \cfusion\lib\ and restart ColdFusion service.

See the sample script below:


    // Login is always required. This example uses two lines of code.

    adminObj = createObject("component","cfide.adminapi.administrator");

    adminObj.login("PASSWORD"); //CF Admin password

    // Instantiate the data source object.

    myObj = createObject("component","cfide.adminapi.Data Sources");

    // Create a DSN.









Using Macromedia driver Oracle when using OTHER as driver

This example describes when users using Oracle RAC with a service name, as ColdFusion do not allow users to add Service name in ColdFusion Admin because only SID is available.

See the sample script below:


    // Login is always required. This example uses two lines of code.

    adminObj = createObject("component","cfide.adminapi.administrator");

    adminObj.login("PASSWORD");  //CF Admin password

    // Instantiate the data source object.

    myObj = createObject("component","cfide.adminapi.Data Sources");

    // Create a DSN.


                                url="jdbc:macromedia:oracle://localhost:1521; service_name=DEV",            


        name="DATA SOURCE NAME",

        username="DB USERNAME",




Using Oracle thin driver Oracle when using OTHER as driver

ColdFusion Standard does not provide Oracle driver as it is part of ColdFusion Enterprise. To add Oracle DB in Standard edition, use Oracle thin driver and place it in \cfusion\lib and restart ColdFusion to load it.

See the sample script below:


    // Login is always required. This example uses two lines of code.

    adminObj = createObject("component","cfide.adminapi.administrator");


    // Instantiate the data source object.

    myObj = createObject("component","cfide.adminapi.Data Sources");

    // Create a DSN.




        name="DATA SOURCE NAME",

        username="DB USERNAME",

        password="DB PASSWORD");



Note: If you are using Sandbox security, user has to provide access to Admin API. Refer this doc:


With the recent ColdFusion releases, we have come across many queries regarding Java updates. The table below shows the default Java shipped with the supported versions.

 ColdFusion Version  Base Installer  Refreshed Installer
 ColdFusion 2016  1.8.0_72   NA
 ColdFusion 11  1.7.0_55   1.8 _25
 ColdFusion 10  1.6.0_29  1.7.0_15


Now, let us look at the supported Java versions for ColdFusion 2016,11 & 10.

Java Version  ColdFusion 2016  ColdFusion 11  ColdFusion 10
Java 1.8  All the updates  Update 3 and above  Update 14 and Above
Java 1.7  Not Supported  Update 2 and earlier  Update 8 and Above
Java 1.6  Not Supported  Not Supported  Update 7 and earlier


Once the support for a major version of Java is added, it also covers all the minor/sub versions.


Upgrading to Java 1.8:

  1. Download the latest version of Java from Please make sure that you download 64-bit Java for 64-bit ColdFusion and 32-bit Java for 32 bit ColdFusion.
  2. Run the installer to install Java.
  3. Take a backup of jvm.config(located at <cf_install_root>\cfusion\bin)
  4. To change from ColdFusion’s default Java, modify the Java home url in either jvm.config or in ColdFusion administrator (Settings ->Java and JVM -> Java virtual machine path).
  5. Restart ColdFusion after making the changes.
  6. To verify the update, log in to ColdFusion Administrator and see verify the newer Java version .

If you are using Web Services, please do the following:

  1. Take a backup of tools.jar from {cf_install_home}/cfusion/lib/
  2. Copy tools.jar from {JDK8_Home}/lib to {cf_install_home}/cfusion/lib/
  3. Clear the stubs from {cf_install_home}/cfusion/stubs/ to get the newly compiled classes.


Note: Any SSL certificates added to the previous JDK will also need to be re-added to the new JDK (cacerts) file.

You can use Java keytool tool located in Java\jre1.8.0_XX\bin to import the certificate.  You can use the below command:

keytool -import -alias name -keystore \Java\jre1.8.0_XX\lib\security\cacerts -file mycert.cer


Java upgrade issues and troubleshooting

  1. If you are unable to start ColdFusion after the Java update:
  • Check the location of Java home in jvm.config.
  • The Java auto-update modifies the Java install directory location, which causes failure to ColdFusion start. Disable the java auto upgrade.
  • Try starting ColdFusion from command line to see specific errors. If the error is "Error loading: C:\Program Files\Java\jdk1.X.X\jre\bin\server\jvm.dll", then copy the msvcr100.dll file to <cf_install_root>/cfusion/bin from {JDK8_Home}/bin (for Windows OS).
  1. After importing certificates, if you have issues related to SSL, then you need to enable debugging for SSL. Take a backup of jvm.config at \ColdFusion\cfusion\bin\ and add under the “Arguments to VM” in jvm.config. This would require a CF service restart. The argument would append the debugging info to the coldfusion-out.log at \ColdFusion\cfusion\logs\.


Memory management is the process of recognizing, when allocated objects are no longer needed, deallocating (freeing) the memory used by such objects, and making it available for subsequent allocations. Since ColdFusion is an application server, ColdFusion requires memory management for effective performance improvement.


Sun Java differentiates memory across five generations:

  1. Young Generation: This generation holds objects with a high mortality rate. In ColdFusion, usually this space holds a variable that only exists in one page, for example – variable scope.
  2. Tenured Generation: This generation holds objects that live for a longer duration. For example, in ColdFusion, client and session scope variables.
  3. Permanent Generation: This generation holds all the reflective data of the virtual machine itself, such as class and method objects.
  4. Minor collections: This type of Garbage Collection (GC) occurs in the Young generation. In ColdFusion, minor collection collects unreferenced local scope and variable scope variables
  5. Major collection: This type of GC occurs in tenured generation. In ColdFusion, this collection collects all unreferenced session scope variables.


We can optimize the amount of memory allocated to ColdFusion server, for better performance. Let us discuss some of the parameters, which will help in Memory tuning.

  1. -Xmx – Defines maximum Java heap size.
  2. -Xms – Defines minimum Java heap size.
  3. MaxPermSize / MaxMetaspaceSize: The JDK 8 JVM uses native memory for the representation of class metadata and is called Metaspace. Users with JDK1.7 or lower will see the attribute MaxPermSize, and users with JDK 8 will see the attributes MaxMetaspaceSize.


Garbage Collection

Garbage collection refers to the process of recycling memory that was assigned to objects no longer referenced by a program. Garbage collection can be divided into 2 types:

  • Minor collection: Garbage collection that occurs in the young generation. In ColdFusion, minor collections will collect unreferenced local scope and variable scope variables
  • Major collection: Garbage collection that occurs in tenured generation. In ColdFusion, this will collect all unreferenced session scope variables.


Concurrent Collector

If the sites on your server are primarily lightweight request/response applications where response times are critical, then the concurrent garbage collector is a viable choice for your server. This collector does its best to collect dead objects from memory while applications on the server are still processing data. This adds a small bit of overhead for transactional applications, but it helps applications maintain their response-time SLAs.  To enable concurrent collector You need to add one of the following jvm arguments in jvm argument -XX:+UseConcMarkSweepGC  or -XX:+UseG1GC

For more information on concurrent collector please click here

Parallel Collector

If the applications on your server are memory-intensive and allocate a lot of objects, then the parallel garbage collector is a viable choice for your server. Any application performing image manipulation or creating a lot of objects is a great candidate for the throughput collector. To enable this garbage collector, add the following JVM arguments in the jvm.config: -XX:+UseParallelGC

 For more information on Parallel collector please click here  


Where to make the chnages?

You can make the changes at ColdFusion administrator (Settings >>Java and JVM >> JVM Arguments). 

Alternatively, you can tune memory in jvm.config, located at ColdFusion install directory (cf_root >> instance name >> bin >> jvm.config). 

Note: It’s always recommended to take a backup of jvm.config before making any changes.


Sever Monitor

If you have an Enterprise edition of ColdFusion, you can use Sever Monitor to monitor your server. You need to go to ColdFusion Administrator >> Server Monitor. To Start and Stop Monitoring, profiling, and memory tracking, click the appropriate buttons o of the server monitor.

Let us discuss about the Server Monitor in detail.

  1. Start Monitoring: This feature gathers information about all requests, including active requests, slowest requests, active sessions, cumulative server, etc. The Server Monitor does not gather information for requests that are excluded on the filter settings page.
  2. Start Profiling: It starts tag and function timing information for the slowest request reports, active queries, slowest queries, cached queries, and query cache status. You can view about each request that is slow or consumes a lot of memory. You can use this feature on development server. We do not recommend you to use this feature in a production environment.
  3. Start Memory Tracking: It gathers information about memory consumption, including all memory usage, queries and session that use most memory. You must enable profiling to view query-related reports.


You need to see if there is any effect on non-heap or heap memory at all. What needs to be deduced from the graph is, if the non-heap memory increases then, the perm gen/metaspace value needs to be recalculated. Whereas, if the heap memory increases, then the Xmx needs to changed.

You can also take help from some 3rd party software to monitor your server like GC viewer. You can also use Jconsole.  It is another memory management tool provided within JDK. The usage information is available at

Follow the same procedure, mentioned above for non-heap or heap memory monitoring and tuning.