Entries Tagged as “productivity”
Administrator · Adobe ColdFusion · Adobe ColdFusion 10 · Adobe ColdFusion 11 · ColdFusion · ColdFusion 11 · creating a website · customers · General · Migration · productivity · Success Story · Tuning · web application development
Many a time, ColdFusion application code is deployed on a network path when your
ColdFusion deployments are of large-scale and mandated to use network paths.
After setting up the server for the first time, if there is any performance hit, as the first thing you would want to cross-check few things. One of the things to determine is if there is any network latency.
Though you would have got same network within your organization same as earlier, your OS version also would have changed.
Follow the steps below to see if the performance hit is due to network latency-
When the server is under moderate or full load(with at least 8-10 requests under process), take 2 or 3 thread dumps with 30 seconds interval.
It is not appropriate to take thread dump when the server has negligible load and anlyze that as there may not be any in-process requests.
If you are not sure how to take thread dump, you can simply follow the following blog.
Open the thread dump file:
Under moderate or full load server conditions, if you see more than 5-8% of running ColdFusion threads containing “WinNTFileSystem” in the thread’s stack trace --> It means that there is lot of time being spent in trying to resolve the application file paths.
Following are the sample threads having WinNTFileSystem in its dump.
"ajp-bio-8014-exec-6861" Id=13898 in RUNNABLE
prio=5 blockedtime=28963 blockedcount=6819 waitedtime=421762 waitedcount=115
at java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
"ajp-bio-8014-exec-6861" Id=13898 in RUNNABLE (running in native)
prio=5 blockedtime=28961 blockedcount=6814 waitedtime=421762 waitedcount=115
at java.io.WinNTFileSystem.canonicalize0(Native Method)
(Note: ColdFusion threads can be identified by the name starting with "ajp-" )
For Example, if there are 50 threads with thread name starting "ajp-bio-" in the thread dump, if you see WinNTFileSystem in more than 2-3 threads, it is the time you start looking at minimizing the network latency.
Once you know there is latency, you would want to know how much is the latency when compared to the application existing locally.
Created a very basic network latency test program to validate this.
You can take the jar from here.
And run it from command prompt as follows:
> C:\ColdFusion11\jre\bin\java -jar <Path of NetworkPathsTest.jar> <Network or Local Directory Path >
If the network path (Ex:- \\orgserver\d$) is accessible only to the ColdFusion service user, open command prompt as that user ( runas /user:<cfserviceaccount domainname>\cfserviceusername CMD )
Path Arguments can be one or more. More Path arguments is a good measure to see the difference clearly.
C:\ColdFusion11\jre\bin\java -jar C:\ColdFusion11\NetworkPathTest.jar \\orgserver\d$\deploy\cfm\
C:\ColdFusion11\jre\bin\java -jar C:\ColdFusion11\NetworkPathTest.jar \\orgserver\d$\deploy\cfm\ \\orgserver\d$\deploy\cfm\api\
Try the same paths keeping the content same on the local machine and see the time differences.
For the same paths on local and remote, the difference in time should not be exponential.
These tests are to be performed on your ColdFusion server machine.
Once you have validations and found any latencies, it is the time to call for network optimization expertise.
Performance · Adobe ColdFusion · Adobe ColdFusion 10 · Adobe ColdFusion 11 · ColdFusion · ColdFusion 11 · General · productivity · Scheduled Tasks
Many times you would want to tweak the performance of the ColdFusion server or want to debug the bottlenecks that make the server unresponsive.
To analyze this, ideally you would want to have Thead dumps and Server memory snapshot(Heap Space, Eden Space, Survivor Space, Old Gen, Perm Gen).
While you can use JDK tools like jstack to get the dumps, it is tedious to install it and schedule the thread dumps.
So, programmatically thread dumps and memory snapshots are are triggered and can be configured as a scheduler task and can be triggered on-demand as well.
Download the following zip file and move it to the server where you want to take thread dumps.
Place this file under: C:\ColdFusion11\cfusion\wwwroot\WEB-INF\lib\ and restart the server for it to load.
And the other file is the cfm file takethreaddump.cfm where the call to ThreadDump class is made and the path where the dump content should be written.
By default it is dumped to the file #GetTempDirectory()#/threaddump<Day>-<Month>-<Year>.log
(Depending on the server location it translates similar to C:\ColdFusion11\cfusion\runtime\work\Catalina\localhost\tmp\threaddump12-8-2015.log)
You can change this to any other convenient path in the cfm file.
You can call this cfm on-demand at point of time or configure a new scheduled task to schedule it at some interval.
More number of Thread dumps are more helpful for problem analysis. So, it is better to take at some interval.
On every new day, dump is rotated automatically to a new file name.
Adobe ColdFusion · Adobe ColdFusion Builder · CFBuilder · productivity · Rapid Application Development
CodeChef which Is available on github is a ColdFusion Builder extension to help you make you very productive in your CFML coding.
What is CodeChef?
CodeChef(as the name suggests) cooks up CFML code for you in no time. Just type in kewords related to what you want to do and you are done. Keyword can be a use cases like “write”, “read”, “create” etc. just a keyword like “file”, “pdf” etc. Once you type keywords in the search filed CodeChef presents you with various options based on it. You select the option based on your requirement and just hit enter. That’s it!!. Basic CFML code related to the selected option will be added to the file currently open in editor.
How to Run the Extension
Just select Code Chef
from dynamic Views drop down and click Show View to get started.
Once Code Chef view is launched just type the action/keyword in Code Chef view (ex. write file, create pdf, loop, or get current directory), select appropriate option from suggestions and hit enter. Appropriate code will be inserted in any file already open in editor. Here is a screenshot of CodeChef view in ColdFusionBulder showing various options for a given keyword
The current version is only a working prototype with limited options just to demonstrate the idea and its power. Here are few screenshots to give an you an idea. Download the extension and give it a try.
As I mentioned its just a working prototype right now so the options are not extensive. I will try to keep adding more code options and keep the project getting better and make CodeChef a really powerful CFML development tool. I will write another post on how once can contribute to add more options to it but since its just CFML and XMl it will be easy to figure it out.
Do give it a try.
Administrator · ColdFusion · ColdFusion 11 · Connector · creating a website · customers · Docs · General · productivity · Tomcat · web application · web application development
You might want to set up ColdFusion in a distributed environment where ColdFusion is running on one machine and Web server is running on a different machine.
Following are the set of steps that have to be performed to achieve this (less error-prone):
This applies to both ColdFusion 10 and ColdFusion 11.
1) Have ColdFusion server installed in a machine.
2) Next thing is to download and install VC Runtime.
- The version of VC Runtime that you have to install depends on the version of ColdFusion.
Say, ColdFusion 11 needs VC Runtime 2012
(32-bit VC Runtime for 32-bit Web server and 64-bit VC Runtime for 64-bit Web server.
If you are not sure, you can install both)
and ColdFusion 10 needs VC Runtime 2010
3) Copy the following contents from the machine where ColdFusion is running to the machine where Web server is running at the same location.
4) Open a Command prompt and run wsconfig tool
C:\ColdFusion11>jre\bin\java -jar cfusion\runtime\lib\wsconfig.jar
It will open a configuration window where you have to provide AppServer Host as the ColdFusion Server IP.
Configure the connector.
Distributed environment is ready for use. Send requests to the Web server's URL with cfm files under web server root and same files under ColdFusion's Web root.
Web server would redirect these to ColdFusion, which is on some other machine.
Performance · Adobe ColdFusion · Language enhancements · PDF Generation · productivity · Splendor
We have a series of e-seminars lined up that gives you a good understanding of the various features of ColdFusion Splendor, which is now in public beta. If you haven't downloaded ColdFusion Splendor already, here is the link where you download the public beta.
Here are the list of e-seminars:
1. Title- Public Beta E-seminar: ColdFusion Splendor Overview Date: 1st April Time: 8 am pacific. Find the recording for the e-seminar here
2. Title- Public Beta E-seminar: Everything about Mobile Application Development Date: 10th April Time 8 am pacific. Find the recording for the e-seminar here
3. Title- Public Beta E-seminar: Delicious Language Enhancements in ColdFusion Splendor Date: 12nd April Time 8 am pacific. Find the recording for the e-seminar here
4. Title- Public Beta E-seminar: Pixel Perfect PDFs in ColdFusion Splendor Date: 24th April Time 8 am pacific. Find the recording for the e-seminar here