ColdFusion Archives - FusionReactor Observability & APM https://fusion-reactor.com/tag/coldfusion/ Thu, 07 Apr 2022 08:06:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 https://fusion-reactor.com/wp-content/uploads/2024/03/cropped-icon-32x32.png ColdFusion Archives - FusionReactor Observability & APM https://fusion-reactor.com/tag/coldfusion/ 32 32 How to debug in production https://fusion-reactor.com/blog/evangelism/how-to-debug-in-production-2/ Thu, 07 Apr 2022 08:06:39 +0000 https://fusionreactor.dev.onpressidium.com/?p=62835 How to debug in production Debugging in production has always been something that we try our best to avoid, with multiple QA phases, staging environments, and automation to stop production bugs. Despite this, occasionally a bug will find its way … Read More

The post How to debug in production appeared first on FusionReactor Observability & APM.

]]>

How to debug in production

Debugging in production has always been something that we try our best to avoid, with multiple QA phases, staging environments, and automation to stop production bugs.

Despite this, occasionally a bug will find its way to production, and when it does, we need a strategy to cope with this safely and efficiently.

Gone are the days where you have a bug in production, you report the issue and reproduce it in staging or development. Modern debugging tools now allow you to safely and reliably debug a production environment safely, without disrupting your users and causing downtime.

Is it safe to debug in production?

One of the key concerns people have is the question of is it safe to debug in production? The answer to this is that it can be.

Specific debugging methods, such as a remote debugger in your IDE or dumping error information to the user, are not considered safe.

Other methods such as logging, error context capture, and debuggers designed explicitly for production can be utilized, with varying success levels.

What makes it safe to debug in production?

If you need to debug in production, there are a few things to ensure when doing so;

  1. Debugging does not have an extensive performance hit.
  2. Debugging does not block people from using your application.
  3. Secure data is not exposed to the outside world.
  4. You are getting enough debug information to find and fix the issue as soon as possible.

The first 3 points are self-explanatory when debugging you need to keep your application running smoothly and keep the process secure.

Getting all required information when an issue occurs can be challenging, but depending on the complexity / severity of the issue, it can be crucial.

When you debug, you want to get as much information about the issue in the least time possible. If you have to jump between multiple systems and iterate over the errors several times to fix the bugs, this only adds to the stress of dealing with a critical issue.

Why is using a remote debugger in production not a good idea?

When using these debugger connections, you have to place the JVM into debug mode, which can have an enormous hit on performance compared to without this debug capability.

Suppose you do not already have a debugger connection configured you would also need to restart Java to establish this connection. This is not something you want to be doing in an already stressful situation.

When you hit a breakpoint the entire Java engine stops, if a breakpoint is fired all threads in the engine are paused. Hence, your application effectively becomes unusable until you stop debugging.

Why dumping error information to the user is not a good idea?

If you have an error, dumping all that information to the user and having it fixed via support teams seems like a good solution; however, you have to be careful about what information is being displayed.

A stack trace on an error page may not look the prettiest but can direct you towards the problem and the data contained in the stack trace is typically safe. There may be something in that trace that you do not want the user to see.

Dumping variables such as user data or request / response information to give you more context can carry greater risk as this can contain data such as authorization headers, security information, and personal data that could make your system vulnerable.

How to use logging to debug in production

For a long time, logging in production to debug errors was the industry standard, with tools like Splunk, Elastic, or Papertrail making this easier.

With logging, you can capture data for any errors, so you have context when they occur. In some languages like Node JS or PHP you can add logging at runtime, although this does carry some risk, in languages like Java this is not always possible.

If you rely on logging it is always best to do this as you develop the application and use the appropriate log levels so that there is no flood of logs during regular operation.

When an error does occur and the data is not sufficient, you can add required logs for that error to get the context you need.

  • When doing this, there are some things you should consider
  • Adding extra logging may require restarting your application
  • Logging volume can become excessive and hard to manage
  • Pinpointing errors can be problematic when buried amongst other messages.

A better alternative to logging in production?

In 2014 the concept of non-blocking debuggers was introduced as a product, the concept of these debuggers is to capture the stack and variables when an event such as an error occurs without blocking the execution of code.

This gives you a picture of what happened when an error occurs so you have the full context of an error automatically. The data captured allows you to hone in on the root cause of an issue without stopping the execution of code or needing any extra logging, debugging tools, or performance impact.

Non-blocking debuggers are great for debugging simpler issues where the root cause of the error is at the top of the stack, if the error is not at the top of the stack you may require further debugging but you will have a much better of where the root cause of the error actually is.

FusionReactor provides a solution called Event Snapshot, when an error occurs, the breaking code, full-stack, and variables will be captured automatically so you can find and fix your errors without the need for any manual work diagnosing the cause of an error.

Debug in Production

Can I use a step debugger in production?

I mentioned earlier in the blog that using a remote debugger like the ones included in your IDE on production machines is not a safe practice, but is there an alternative to this that allows you to step through errors?

Some stepping debuggers are explicitly designed to operate in a production environment, so you can pause code, step through and observe state changes without affecting the users of your application.

This is done by limiting debugging to a single thread of an application as opposed to stopping the entire engine and using a combination of conditions so that you will not lock threads in operation where it is not necessary.

For example, you could set a breakpoint with the conditions to only debug if a variable was not set or only on certain accounts, when the breakpoint fires you can set a timeout so the thread is released after a set period of time.

In some cases where you have a severe or complex error and want to diagnose the cause quickly, blocking a single thread or user for a short period of time allows a diagnosis that gets your application running smoothly is a better alternative than delaying the fix to not interrupt the user.

FusionReactor provides such a debugger, where you can set a breakpoint on an exception triggering, on method entry or on a specific line of code. Conditions allow you to tune the breakpoint so that you can debug an issue whilst the rest of your application functions as normal.

How to debug in production – a quick summary

Debugging in production used to be something people actively avoided, but due to the rapidly increasing complexity of applications and the environments around them software is now at a point that this can no longer be the case.

While some methods of debugging such as connecting an IDE are definitely not recommended, there are reliable and safe ways to debug a production issue.

Logging in production will give you the results you need, but may take time to get right and require a restart to two.

Embracing new technologies that assist you in automatically debugging in production by capturing context is something we should embrace in our environments so we are no longer afraid of a production issue.

FusionReactor is one such tool that you should consider including in your environment, with a free 2-week trial

The post How to debug in production appeared first on FusionReactor Observability & APM.

]]>
Beware Ransomware Attacks on Very Old ColdFusion Servers (CF9 and 8) https://fusion-reactor.com/blog/technical-blogs/beware-ransomware-attacks-on-very-old-coldfusion-servers/ Tue, 12 Oct 2021 07:26:05 +0000 https://fusionreactor.dev.onpressidium.com/?p=65758 Beware Ransomware Attacks on Very Old ColdFusion Servers (CF9 and 8) It’s always risky to run old versions of software, of course, and that problem is hitting home for those who may still be running very old versions of Adobe … Read More

The post Beware Ransomware Attacks on Very Old ColdFusion Servers (CF9 and 8) appeared first on FusionReactor Observability & APM.

]]>

Beware Ransomware Attacks on Very Old ColdFusion Servers (CF9 and 8)

It’s always risky to run old versions of software, of course, and that problem is hitting home for those who may still be running very old versions of Adobe ColdFusion, such as CF9 (released in 2009) or 8 (from 2007) if they failed to apply a hotfix that Adobe had provided in 2010.  A recent spate of ransomware attacks has occurred, hitting such vulnerable servers, as reported in the various security industry press.

If you’re still running ColdFusion 9 or 8 (which really, you should not be), you can learn more about the fix that Adobe had made available in 2010, as well as in Cumulative Hotfixes that followed it.

For more on who’s affected, and who’s not, and what you can do if you’re still on CF9 or 8, as well as more about the attack, see my post with much more detail.

CF blogger Charlie Arehart

Best deals on CF licences

If you are looking to purchase a new CF license then our sister site buy-adobe-software has some of the best deals around.  If you want to know your upgrade options then please reach out to our sales team in chat.

 

 

The post Beware Ransomware Attacks on Very Old ColdFusion Servers (CF9 and 8) appeared first on FusionReactor Observability & APM.

]]>
Changing FusionReactor’s “Slow Request Threshold”, Why and How https://fusion-reactor.com/blog/evangelism/changing-fusionreactors-slow-request-threshold-why-and-how/ Tue, 02 Mar 2021 08:16:37 +0000 https://fusionreactor.dev.onpressidium.com/?p=62901 You may have noticed in the FusionReactor UI that requests which are “slow” have their duration show up in red in the FusionReactor UI. The default is 8 seconds, but what if you would prefer to lower that duration to … Read More

The post Changing FusionReactor’s “Slow Request Threshold”, Why and How appeared first on FusionReactor Observability & APM.

]]>
You may have noticed in the FusionReactor UI that requests which are “slow” have their duration show up in red in the FusionReactor UI. The default is 8 seconds, but what if you would prefer to lower that duration to something like 3 seconds instead? That could be important, and it’s easy though many might never realize it was even an option.

In this post, I will show you how to change that easily, and how to see the impact of that setting on other pages of the UI. I’ll also address changing the JDBC or “transaction” threshold also. (These settings apply only to the traditional FusionReactor “on-premise” UI as opposed to the newer FR Cloud UI.)

By way of introduction, I love FusionReactor and use it every day, and I’ve been showing people how to make the best use of it for nearly 15 years, including over a dozen past hour-long webinars, as well as in my own blog and other community resources. I want to start sharing tips here on the FusionReactor blog, both to help an even wider audience and to show my support for the fine folks who make FusionReactor, who are all excellent people. (If I can continue offering these posts, we may label them as a series.)

Where to see/change the “Slow Request Threshold”

This setting, which defaults to 8 seconds, is set in the FusionReactor (on-premise) UI in the Requests button on the left, and its Settings option:

Then its “WebRequest History” option and finally its “Slow Request Threshold” setting:

Where to see the impact of the Slow Request Threshold

Again there are primarily the two ways I mentioned above where you would see the impact of the “Slow Request Threshold”.

First, notice that in any list of requests (including most pages under the Requests button on the left, including Activity, History, Error History, Slow Requests, Longest Requests, and so on), if the duration of a request exceeds the threshold, then the duration time (in ms) is shown in red.

Here’s an example showing that on the Requests>History page (in the on-premise UI), which by default shows the 100 most recent requests, regardless of duration. Notice how some (but not all) requests show their duration in red (with the less bolded red indicating just barely over the threshold):

The second place I mentioned is the Requests>Slow Requests page, which focuses solely on “slow” requests meeting this threshold: specifically, it shows the most recent 100 (also configurable) requests which were “slow”. Here’s an example of that:

Other pages impacted by these settings

There are still other places that the “Slow Request Threshold” has an impact. In the Metrics>Web Metrics page, the text below the graphs has some counters about “slow” requests, and that would be impacted by this setting.

There is no relationship between this setting and things like the FusionReactor (FR) logs or Crash Protection alert emails.

Again, the setting seems to have no impact on the FR Cloud UI, from my assessment of things. (I realize some readers will not be aware of what is the FR Cloud offering, or how to find it, use it, enable it, and more. That’s good fodder for future posts.)

Some related topics

Before moving on, there are a few related topics that we can consider briefly.

Consider also the “Slow Transaction Threshold”

First, while the focus of this post has been the “Slow Request Threshold” and the tracking of slow requests, some readers may notice that the various pages showing JDBC requests and transactions (under the JDBC and Transaction buttons on the left, respectively, of the FR on-prem UI) also can show duration values in red–but those trigger at 3 seconds (by default) instead of 8.

How could you change that default of 3 seconds (if perhaps you wanted to regard queries taking even 1 second as being slow)?

It’s a little confusing: you might look for that in the JDBC>Settings or Transactions>Settings pages, but instead, it’s in that same Requests>Settings that I first mentioned. Then it’s on the “Transaction History” page (right below the aforementioned “WebRequest History” page). See the “Slow Transaction Threshold” (and related settings).

Controlling how MANY requests appear in the Slow Requests, JDBC,  and Transaction pages

While on the topic of the “slow” pages for Requests, JDBC,  and Transactions, you may wonder how to control how MANY items appear on those pages. Again, the “Threshold” settings discussed above govern what duration leads things to appear on them.

If you look at the first screenshot above (WebRequest History), note that there is a also “Slow Request History Size”. That controls HOW MANY requests appear on the “Slow Requests” page. And In the Transaction History page, I just mentioned, there is a “Slow Transaction History Size”, which governs how many JDBC or Transactions appear on their respective “Slow” pages. (This also governs how many appear within the JDBC section within a request’s details.)

Be careful when raising either of these sizes: FusionReactor is conservative in its setting of such “sizes,” since the larger you make them, the larger their respective lists will be and the longer it will take to render the page–and the more heap will be used within your monitored instance, though the usage is tiny with the default settings.

My webinar on tweaking other configurable FR settings

If you liked learning of these settings, you may like still other ones that I share in a 2017 webinar I did on “Configuring FusionReactor for Action“. I was surprised to see that this topic was NOT among the many, many configurable settings I covered in that hour–but that just shows how many others there are! 🙂

Because most of my FusionReactor webinars are from a few years ago, they are no longer offered on the FR website (on their video tutorials page). And while there have been new FR versions since then, most of the things I discuss are still relevant and found in the same places now.

But do check out that video tutorials page also, They are not only short but more polished (with scripted narration, with professional voiceover), and they often focus on still-newer features.

Conclusion

That’s quite a bit to consider for such a simple setting. And this is often the case: FusionReactor surfaces so much value that folks may be satisfied for years with what it offers and may never even dream there’s a way to tweak things to make them still more valuable. And I hope to tease out of those older webinars of mine some of the many hidden gems I shared, to offer in new posts to come and perhaps new videos.

Again, I love helping people use FR. In fact, I do it daily in my consulting. If I can ever help you solve a knotty problem (whether it may involve using FR or not), you can find more and reach out at https://www.carehart.org/.

The post Changing FusionReactor’s “Slow Request Threshold”, Why and How appeared first on FusionReactor Observability & APM.

]]>
How to debug in production https://fusion-reactor.com/blog/evangelism/how-to-debug-in-production/ Mon, 08 Feb 2021 15:00:44 +0000 http://fusionreactor.dev.onpressidium.com/?p=62386 How to debug in production Debugging in production has always been something that we try our best to avoid, with multiple QA phases, staging environments, and automation to stop production bugs. Despite this, occasionally a bug will find its way … Read More

The post How to debug in production appeared first on FusionReactor Observability & APM.

]]>

How to debug in production

Debugging in production has always been something that we try our best to avoid, with multiple QA phases, staging environments, and automation to stop production bugs.

Despite this, occasionally a bug will find its way to production, and when it does, we need a strategy to cope with this safely and efficiently.

Gone are the days where you have a bug in production, you report the issue and reproduce it in staging or development. Modern debugging tools now allow you to safely and reliably debug a production environment safely, without disrupting your users and causing downtime.

Is it safe to debug in production?

One of the key concerns people have is the question of is it safe to debug in production? The answer to this is that it can be.

Specific debugging methods, such as a remote debugger in your IDE or dumping error information to the user, are not considered safe.

Other methods such as logging, error context capture, and debuggers designed explicitly for production can be utilized, with varying success levels.

What makes it safe to debug in production?

If you need to debug in production, there are a few things to ensure when doing so;

  1. Debugging does not have an extensive performance hit.
  2. Debugging does not block people from using your application.
  3. Secure data is not exposed to the outside world.
  4. You are getting enough debug information to find and fix the issue as soon as possible.

The first 3 points are self-explanatory when debugging you need to keep your application running smoothly and keep the process secure.

Getting all required information when an issue occurs can be challenging, but depending on the complexity / severity of the issue, it can be crucial.

When you debug, you want to get as much information about the issue in the least time possible. If you have to jump between multiple systems and iterate over the errors several times to fix the bugs, this only adds to the stress of dealing with a critical issue.

Why is using a remote debugger in production not a good idea?

When using these debugger connections, you have to place the JVM into debug mode, which can have an enormous hit on performance compared to without this debug capability.

Suppose you do not already have a debugger connection configured you would also need to restart Java to establish this connection. This is not something you want to be doing in an already stressful situation.

When you hit a breakpoint the entire Java engine stops, if a breakpoint is fired all threads in the engine are paused. Hence, your application effectively becomes unusable until you stop debugging.

Why dumping error information to the user is not a good idea?

If you have an error, dumping all that information to the user and having it fixed via support teams seems like a good solution; however, you have to be careful about what information is being displayed.

A stack trace on an error page may not look the prettiest but can direct you towards the problem and the data contained in the stack trace is typically safe. There may be something in that trace that you do not want the user to see.

Dumping variables such as user data or request / response information to give you more context can carry greater risk as this can contain data such as authorization headers, security information, and personal data that could make your system vulnerable.

How to use logging to debug in production

For a long time, logging in production to debug errors was the industry standard, with tools like Splunk, Elastic, or Papertrail making this easier.

With logging, you can capture data for any errors, so you have context when they occur. In some languages like Node JS or PHP you can add logging at runtime, although this does carry some risk, in languages like Java this is not always possible.

If you rely on logging it is always best to do this as you develop the application and use the appropriate log levels so that there is no flood of logs during regular operation.

When an error does occur and the data is not sufficient, you can add required logs for that error to get the context you need.

  • When doing this, there are some things you should consider
  • Adding extra logging may require restarting your application
  • Logging volume can become excessive and hard to manage
  • Pinpointing errors can be problematic when buried amongst other messages.

A better alternative to logging in production?

In 2014 the concept of non-blocking debuggers was introduced as a product, the concept of these debuggers is to capture the stack and variables when an event such as an error occurs without blocking the execution of code.

This gives you a picture of what happened when an error occurs so you have the full context of an error automatically. The data captured allows you to hone in on the root cause of an issue without stopping the execution of code or needing any extra logging, debugging tools, or performance impact.

Non-blocking debuggers are great for debugging simpler issues where the root cause of the error is at the top of the stack, if the error is not at the top of the stack you may require further debugging but you will have a much better of where the root cause of the error actually is.

FusionReactor provides a solution called Event Snapshot, when an error occurs, the breaking code, full-stack, and variables will be captured automatically so you can find and fix your errors without the need for any manual work diagnosing the cause of an error.

Debug in Production

Can I use a step debugger in production?

I mentioned earlier in the blog that using a remote debugger like the ones included in your IDE on production machines is not a safe practice, but is there an alternative to this that allows you to step through errors?

Some stepping debuggers are explicitly designed to operate in a production environment, so you can pause code, step through and observe state changes without affecting the users of your application.

This is done by limiting debugging to a single thread of an application as opposed to stopping the entire engine and using a combination of conditions so that you will not lock threads in operation where it is not necessary.

For example, you could set a breakpoint with the conditions to only debug if a variable was not set or only on certain accounts, when the breakpoint fires you can set a timeout so the thread is released after a set period of time.

In some cases where you have a severe or complex error and want to diagnose the cause quickly, blocking a single thread or user for a short period of time allows a diagnosis that gets your application running smoothly is a better alternative than delaying the fix to not interrupt the user.

FusionReactor provides such a debugger, where you can set a breakpoint on an exception triggering, on method entry or on a specific line of code. Conditions allow you to tune the breakpoint so that you can debug an issue whilst the rest of your application functions as normal.

How to debug in production – a quick summary

Debugging in production used to be something people actively avoided, but due to the rapidly increasing complexity of applications and the environments around them software is now at a point that this can no longer be the case.

While some methods of debugging such as connecting an IDE are definitely not recommended, there are reliable and safe ways to debug a production issue.

Logging in production will give you the results you need, but may take time to get right and require a restart to two.

Embracing new technologies that assist you in automatically debugging in production by capturing context is something we should embrace in our environments so we are no longer afraid of a production issue.

FusionReactor is one such tool that you should consider including in your environment, with a free 2-week trial

The post How to debug in production appeared first on FusionReactor Observability & APM.

]]>
Why Load Test ColdFusion Apps (4 Reasons) https://fusion-reactor.com/blog/evangelism/why-load-test-coldfusion-apps-4-reasons/ Mon, 18 Jan 2021 11:58:18 +0000 http://fusionreactor.dev.onpressidium.com/?p=61659 By Michaela Light, CEO of TeraTech Let’s make sure that your new ColdFusion app doesn’t crash immediately after launch – by effective load testing. In this article, we will look at 4 reasons why load test ColdFusion Apps. You will … Read More

The post Why Load Test ColdFusion Apps (4 Reasons) appeared first on FusionReactor Observability & APM.

]]>

By Michaela Light, CEO of TeraTech

Let’s make sure that your new ColdFusion app doesn’t crash immediately after launch – by effective load testing.

In this article, we will look at 4 reasons why load test ColdFusion Apps. You will learn:

Why do you need to load test?

How to Easily Load Test and Make it a Routine

  1. Pick a load testing tool
  2. Write testing scripts that simulate real life
  3. Assess the results of the test
  4. Rinse and repeat your tests and fixes

The Long-term Benefits of Load Testing

About the Author

If you don’t plan ahead with load testing when too many users hit your newborn app at the same time, then it can become very slow or even crash your CF server. Leading to upset users, lost revenue for your company, and serious egg on the faces of everyone in your IT department.

In performance tuning circles, we call it “The Wall”. It’s hard to see it coming. But you’ll know when you’ve hit it.

“The Wall, in web applications, is that perfect storm of occurrences that suddenly, and within seconds, brings a web application to its knees. It is almost always caused by one thing: a stacking up of all available ColdFusion application threads. Which to be fair, is preceded, rather quickly, with a slow down in performance. 

There can be many reasons, a successful marketing campaign, a major event, an unexpectedly successful launch. Whatever the cause, it is possible to architect and build infrastructure that can cope with any load” – my colleague Mike Brunt (CF performance expert) says.

It’s a wall similar to the one faced by marathon runners. It’s when your body decides to call it quits and all systems fall apart.

Fortunately, you can avoid The Wall with load testing. Done properly, it can save you and your company a lot of time, money, and frazzled nerves. Let’s look in more detail at why you should load test.

Why Do You Need To Load Test ColdFusion Apps?

No ColdFusion team wants their new app to crash after launch. But sometimes under pressure, or due to lack of knowledge, you launch it too soon. Before it has been stress-tested under real load conditions. 

There are a few nasty side-effects of poorly-planned app launches that lead to crashes. This is typically caused by a sudden influx of traffic or users, spiking demand at times when resources are limited. It can bring your web app crashing down. It happens when you are stacking up all available application threads that collapse under their own weight.

  • Crashes can spook users, leading them to jump to your competitors. 
  • It will slow down your company’s critical operations that are dependent upon the app. This all leads to added costs.
  • Inevitably, you will have to call in the fire brigade to squeeze out new load capacity.
  • Perhaps worst of all: Bugs and server crashes will chase away customers and kill productivity. This, in tandem, hurts your company’s image. 

With proper load testing, you can discover your app’s weak points before the curtain opens on your launch to a live audience. With the right set up, you can enjoy pushing your app and server architecture to the limit, breaking them, and then fixing the resulting mess. All in a consequence-free setting. Makes me feel like a kid again!

Load testing your code and app is the most effective, least costly way to expose any weaknesses or mistakes in your work.

How To Easily Load Test ColdFusion Apps and Make It A Routine

1. Pick a load testing tool

Start with a load testing tool such as the free open-source Apache JMeter. It lets you write and playback user scripts that simulate real users running your app. You can include userIDs/passwords or other user data from data files to make the simulated users more realistic. And include random “thinking time”, just as humans delay between clicks or form submits. 

As you progress in load testing, you can consider the many paid load testing tools which add more features, with prices ranging from $100 to $100,000.

2. Write Testing Scripts That Simulate Real Life

Write a testing script that mimics real users interacting with your web app.
Make sure the “users” are as active and numerous as real-world users would be. They should be clicking, updating, refreshing, downloading, and generally frantically chewing over every inch of your app.

Turn up the load of simulated users through 3 levels:

  • Ramp up the number of users until your app slows down. 
  • Take it to the normal expected number of users and see how it performs.
  • Then get “a little bit naughty” – keep ramping up users until it finally breaks the server with a total crash. This is called a stress test and lets you find the ultimate limits to your code, architecture, and hardware setup. 

Note you should have fixed all regular bugs before you start load testing. I wrote about Testing and automated testing to help with that.

3. Assess The Results Of The Test

Now that your digital army of simulated users has done a great job of slowing down or crashing your app, you can get to work in analyzing why it happened. 

Load issues are usually caused by a combination of factors:

  • Software configuration issues, either for CF, IIS, JVM, databases
  • Poorly optimized software code that cannot handle an influx of activity
  • Badly designed database tables, indices, or queries
  • Speed issues with external services called by CFHTTP or REST API calls
  • Poor network configurations which get bogged down by increased demand
  • Incorrectly configured clustering and load balancing
  • Insufficient hardware (CPU, RAM, and disk space), which cannot meet the overall demands of running the app at peak load

You can learn more about fixing issues in this podcast interview I did with CF scaling expert Mike Collins.

I use a performance monitoring tool such as FusionReactor during load tests to make tracking down the cause of problems easier.

4. Rinse and Repeat Your Tests and Fixes

Keep load testing your app until:

  • You’re sure the expected number of users won’t slow down your app.
  • You can handle reasonable surges in users, of say 100% above the expected load. 
  • You are comfortable that the point that your server crashes under load is a high number of users. And given user growth predictions, that it is far enough into the future that you could buy extra hardware to prevent problems before they happen.

The Long-term Benefits of Load Test ColdFusion Apps

Load testing remains one of the more overlooked aspects of CF development. Many treat it as an afterthought. But it’s an early decision that could have long-term ramifications for the success of your web app, as well as the financial health of your company. Load test properly, or it could cost you big time. In the worst case, it can cause a company to go out of business.

Run tests that push the limits of your web apps and servers. This stress test will show your app’s breaking point, which will help you spot trouble ahead of time.

Be optimistic! Load testing is a part of coding where not planning for failure leads to ultimate failure after launch.

About the Author

Michaela Light Image

Michaela Light is the host of the CF Alive Podcast and has interviewed more than 100 ColdFusion experts. In each interview, she asks “What Would It Take to make CF more alive this year?” The answers still inspire her to continue to write and interview new speakers. Michaela has been programming in ColdFusion for more than 25 years. She founded TeraTech in 1989. The company specializes in ColdFusion maintenance, application development, security, and optimization. She has also founded the CFUnited Conference and runs the annual State of the CF Union Survey. 

The post Why Load Test ColdFusion Apps (4 Reasons) appeared first on FusionReactor Observability & APM.

]]>
ColdFusion and Microservices https://fusion-reactor.com/blog/technical-blogs/coldfusion-and-microservices/ Tue, 01 Dec 2020 10:45:03 +0000 http://fusionreactor.dev.onpressidium.com/?p=57452 The all-new Adobe ColdFusion 2021 has just been released with dozens of features introduced to boost efficiency, security, scalability, language improvement, in addition to much newer instruments for performance monitoring and profiling. A substantial focus of CF2021 is support of … Read More

The post ColdFusion and Microservices appeared first on FusionReactor Observability & APM.

]]>

The all-new Adobe ColdFusion 2021 has just been released with dozens of features introduced to boost efficiency, security, scalability, language improvement, in addition to much newer instruments for performance monitoring and profiling. A substantial focus of CF2021 is support of microservices architecture.

As a variant of the service-oriented framework style, Microservices is a pattern that organizes complex applications into a collection of smaller-scale but related services deliveries, which CF2021 supports in a number of ways.

ColdFusion Microservices Title Image

1. Lightweight Installer Package

CF2021 comes equipped with either a GUI installer or a featherweight express installer package (currently between the range of 100 – 200 MB as against the GUI installer size of about 1GB) designed to allow for the automation of repeatable installations with the exact features you require. The lightweight installer package gets CF up and running in a matter of seconds.

2. Scriptable configuration

CF2021 offers a new scriptable configuration tool, cfsetup, which supports creating json configuration files that can be imported at CF startup. The tool supports displaying configuration settings and more, and it expands greatly on the former (but still-supported) ColdFusion ARchive/CAR feature. It’s now very easy to completely automate the implementation of CF, whether in the cloud or on-premise.

3. Cloud Services integration

CF2021 continues the microservices theme with several substantial new features supporting cloud services (in both AWS and Azure), from storage (AWS S3 and Azure Blob), message queuing (AWS SQS and Azure Message Bus), nosql cloud databases (AWS dynamoDB and Azure Cosmos DB), as well as notification (AWS SNS) and email (AWS SES) services. Again, whether deploying ColdFusion in the cloud or on-premise, CF2021 adds significant new integration possibilities.

4. Serverless deployment via AWS Lambda

Another key aspect of microservices architecture is the option of serverless deployment (also known as “functions as a service”), as implemented in services such as Azure Functions and AWS Lambda. CF2021 continues its microservices support with a feature to deploy CFML to AWS Lambda, so that you have no server to manage and resources are used only on-demand.

5. Provision Docker Images

CF2021 offers Docker images (as were provided also for CF2018 and 2016) which are available via bintray.com and as discussed here. The new versions continues the microservices theme, from being smaller and faster to start as well as supporting two new environment variables related to features above:

  • ImportCFSettings: imports the cfsetup-based JSON configuration file, to automate Admin settings
  • InstallModule: imports a comma-separated list of CF2021 modules to be installed

CF2021 allows you to deploy and scale CFML applications in any environment seamlessly, including via continuous integration and continuous delivery (CI/CD).

Microservices Diagram

And of course all these CF2021 new features expand upon the various aspects of CF that have long made it capable to develop applications quickly and integrate with external services, whether in the cloud or on-premise. CF2021 also supports configuration of cloud/RDS databases as CF datasources. And through the ColdFusion Enterprise API manager, teams can easily create, manage, and monitor their API services.

6. Other improvements in CF2021

Other notable features added to the CF2021 release include SAML (single sign-in) integration, support for the MongoDB noSQL database, and many language improvements including rest and spread operators, parallelism on arrays and structs, iterator and static block support for CFCs, IIFE (Immediately Invoked Function Expression), and more. CF2021 also provides for direct coding of Java within CFML, as well as still other new features.

Conclusion

With its many new features and focus on modern development, the CF2021 release may be the most professional version to be introduced since the debut of the ColdFusion development platform 25 years ago.

The post ColdFusion and Microservices appeared first on FusionReactor Observability & APM.

]]>
ColdFusion Performance Issues and Troubleshooting https://fusion-reactor.com/blog/evangelism/coldfusion-performance-issues-and-troubleshooting/ Thu, 19 Nov 2020 10:52:31 +0000 http://fusionreactor.dev.onpressidium.com/?p=56187 With ColdFusion being one of the most powerful and robust Java development platforms for web application development, it does not automatically eliminate the presence of certain parameters that could lead to a performance issue on a ColdFusion server.  You’ll find … Read More

The post ColdFusion Performance Issues and Troubleshooting appeared first on FusionReactor Observability & APM.

]]>

With ColdFusion being one of the most powerful and robust Java development platforms for web application development, it does not automatically eliminate the presence of certain parameters that could lead to a performance issue on a ColdFusion server. 

You’ll find out more about the ColdFusion performance issues and troubleshooting in the other part of this article.

What Is ColdFusion?

ColdFusion is a commercial Java-based web application development Server introduced in 1995. The original intent for creating the ColdFusion Java computing platform was to connect basic HTML webpages to a database or server easily. 

Within a year, the beta version (II) was launched as a complete platform. With the inclusion of an in-house IDE (Integrated Development Environment) and scripting language known as ColdFusion Markup Language (CFML). 

The ColdFusion’s multiple utilities include generating remote services like- REST, SOAP web services, Flash remoting, or WebSockets

ColdFusion is also used for data-driven intranets, websites, and web applications. It fits a server-side technology to client-side ajax – since ColdFusion handles asynchronous events. Things such as SMS and instant messaging through the gateway interface is made accessible in the Macromedia ColdFusion MX 7 Enterprise Edition.

Common Causes To ColdFusion Performance Issues

Issues related to performance are one of the biggest snags encountered during the design and implementation of web applications. Problems such as website crashes, CPU hikes, delay in process thread, Memory leaks, Error 503, Network Latency, etc., cause both short and long-term revenue loss.

I) CPU Surges

Failure to perform load and performance tests could result in the inefficient running of the ColdFusion platform to quickly detect the impact on the existing CPU utilization. Some of the major causes of CPU spikes are;

Out of Memory Issues

The frequency of CPU spikes can be tracked in the ColdFusion logs for OutOfMemory entries. Two basic scenarios could result in such surges. The OutofMemory issues occur when the Garbage collector cannot claim memory – due to persistent reference to stale objects or on the CPU thread.

  1. OutofMemoryError: Heap: – The heap (OutOfMemory) surge occurs when a much lower value of the heap than the actual usage results in a much slower response rate within the Java Virtual Machine (JVM). In addition to the application usage exceeding the upper limit provided. By your application memory usage, you can solve the OutofMemory: Heap problem by updating the maximum heap size. You can change this value in ColdFusion’s Administrator dashboard or visit: JVM.config (ColdFusionXXXX/instance_name/bin).
  2. OutOfMemoryError: – Given the latest version of the Java Software development environment – Java 1.8, comes the introduction of a new flag known as the MaxMetaspaceSize. This allows you to limit the amount of native memory been utilized for class metadata. By convention, all class metadata allocations are restricted to the amount of native memory available. But in recent times, most of the slots allocated for the class metadata in a metaspace environment have been allocated outside of native memory. Once the class metadata raises the “MaxMetaspaceSize” error, garbage collection of those expired classes and classholders are then triggered.

To limit the frequency or delay of the garbage collection process, adequate monitoring and tuning of the Metaspace are essential.

Slow Database Query Thread

All of the logs generated by ColdFusion – Application logs, Exception logs, and error logs, help the platform identify slow queries, when a query times out or not, and then fixes them. If a ColdFusion server is running slow or when a query execution is taking too long, this signals a problem with either the Application or code. At which point, high rates of website desertion become imminent. Reduced user engagements can result in an increased loss in revenue, hence, affecting your bottom-line. Slow applications may be due to a variety of issues in your application codebase and how the servers were being configured.

ColdFusion terminates all connections after such timeouts. It then recycles the cache for idle or unresolved connections – these idle connections would be reused when required.

Network Wait-time

Network latency amounts when the application codebase is located in a shared drive within the ColdFusion environment. Most servers crash and slow request processes are also affected by network latency. As a rule of thumb, it is always recommended to check your local network throughout. Querying a ColdFusion database may be impeded by a variety of factors. Unavailable service errors are one of them. 

To speed up the processing of your ColdFusion Markup – CFM, pages on a network or shared location, add the following commands to the JVM config:

-Dsun.io.useCanonPrefixCache=true

-Dsun.io.useCanonCaches=true. 

Note: The default timeout is 30 seconds.

The above instruction activates the dedicated cache that stores the established path to the file. This maneuver comes in handy in the events that there are lots of threads awaiting the attention of WinNTFileSystem – to be allocated a path. While trying to gain access to files from a shared network server, every “getCanonicalPath” command is redirected to the network. Making them all an expensive task to handle. Therefore, enabling the canonical cache establishes a simple fact; for the same file, the JVM does not need to go back to the disk to find its path. Since it already exists in the cache.

Random Number Generation

The Linux number generation often exerts a toll on the CPU on most Unix platforms. One contributing factor to the random generation and server startups being slow is that the “/dev/random” command. This is used on Unix platforms to generate a number randomly.

To eliminate performance issues due to random number generation, you can add the following code to the config:

-Djava.security.egd=file:/dev/./urandom

Garbage Collection

Excessive Garbage Collection – GC is often caused by extra load on a server – which is also the primary causative agent to CPU spikes. There are four major types of garbage collection mechanisms in Java 8 – Parallel Garbage Collection (-XX:+UseParallelGC), G1 Garbage Collection (-XX:+UseG1GC ), Serial Garbage Collection (-XX:+UseSerialGC), and CMS Garbage Collection (-XX:+UseConcMarkSweepGC).  ColdFusion employs the Parallel Garbage Collection techniques as its default convention for Garbage Collection.

For detailed information and real-time tracking of out of memory errors or memory leaks, you can perform a heap dump analysis. Do this by adding the following JVM arguments in the JVM config to obtain the heap dump: –

-XX:+HeapDumpOnOutOfMemoryError

XX:HeapDumpPath= <path_to_dump_file>

You can run the below commands directly from the ‘\jdk\bin’ directory – if you have JDK installed: jmap -dump:format=b,file=dump.hprof, given that, PID is the ColdFusion process id.

II) Application Thread Dumps

Server crashes often emerge from many unrelated issues in the ColdFusion server, Java Virtual Machine SQL database, or Operating System. ColdFusion thread dumps are mainly used for analytical purposes. Those such as evaluate; recent, executable, pending, blocked, time_waiting, and running threads on the ColdFusion platform.

Other performance-related issues like GC or OutofMemory exceptions, deadlock, hang IO calls, infinite loop, etc., can all be tracked using the thread dumps. 

If you run the ColdFusion update 12 (2016 release), use the takethreaddump.cfm file to monitor the thread dump. Also, if the performance is in any way affected by XML parsing, then the following JVM argument can fix it:

-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true

Other notable causes of ColdFusion performance issues include; Excessive logging and data caching, Inefficient SQL tuning & capacity planning, Application-specific performance problems, Service availability error, Lack of proper data caching, etc.

Whether it is a ColdFusion Emergency – CF, crashing server, or a slow CF application, professional server monitoring & tuning software suites like FusionReactor offers a streamlined approach. Designed to foster quicker resolutions of ColdFusion performance array of Servers & Application related problems. FusionReactor is the major distributor of ColdFusion results. Reporting information that comes in handy during the isolation of specific and related issues. Also, you can use the FusionReactor Memory profiler to help spot memory leaks, and review heap dumps. 

The post ColdFusion Performance Issues and Troubleshooting appeared first on FusionReactor Observability & APM.

]]>
Adobe ColdFusion 2018 Versus Lucee https://fusion-reactor.com/blog/technical-blogs/adobe-coldfusion-2018-versus-lucee/ Tue, 17 Nov 2020 11:43:22 +0000 http://fusionreactor.dev.onpressidium.com/?p=55988 Adobe ColdFusion and Lucee are two leading web application development tools based on CFML (ColdFusion Markup Language) code. Adobe ColdFusion was initially developed to connect HTML and the database easily. With the release of Adobe ColdFusion 2018, a full-blown scripting language … Read More

The post Adobe ColdFusion 2018 Versus Lucee appeared first on FusionReactor Observability & APM.

]]>

Adobe ColdFusion and Lucee are two leading web application development tools based on CFML (ColdFusion Markup Language) code. Adobe ColdFusion was initially developed to connect HTML and the database easily. With the release of Adobe ColdFusion 2018, a full-blown scripting language with CFML is incorporated along with an IDE. Further, the platform has been updated and enhanced to build more modularized, maintainable, and responsive web applications.

The popularity of CF led to the development of many open-sourced platforms, among which Lucee became a strong competitor for Adobe ColdFusion. Lucee stands up as an alternative CFML engine that employs dynamically typed scripting language for the Java Virtual Machine for the rapid development of web applications. 

This article shall give you a briefing on both software by comparing and contrasting each other based on the below concerns.

Surface Comparison

Price

Adobe ColdFusion 2018 comes with a price tag. Depending on the package chosen, the price varies. CF Standard costs from $2,499, while the CF Enterprise with some enhanced features comes at $9,499 onwards.

Meanwhile, Lucee is free and open-sourced. This stands as a major plus point in choosing between the two, encouraging novice developers to shift towards Lucee instead of Adobe.

Installation and Requirements

Installing Adobe ColdFusion 2018 requires a lot of prior work, such as ensuring the server connection. This is based on the platform you work with. 

In contrast, Lucee streamlines the installation process by automatically carrying out server connections. This makes Lucee a stand-alone app and is compatible with Windows and Linux.

User Support

A devoted support team stands by Adobe that can be reached through phone or via online tickets for direct support. They also help with troubleshooting and have readily available testing tools. 

Lucee is more of a community-based software. The members of the Lucee Association Switzerland help with the issues arising for its users. However, for larger-scale issues and troubleshooting, third party commercial support services are to be sought.

Language Support 

Adobe CF works on CFML. However, it still supports other programming languages such as .NET, ActionScript, and CFScript. Moreover, ColdFusion is a Java EE platform that can be combined with the rest of Java classes and libraries holding some exclusive proprietary functionalities.

Lucee also allows you to work with java classes. But it is also proved to be better than Adobe CF  when working with JSON. 

Hosting

ColdFusion features a single and central CFADMIN that is accessible only by the HR host. The admin settings are also all global and cannot be customized as per the website.  

When compared, Lucee holds a higher advantage with shared hosting, allowing each website to have its web admin. The CFML settings, mail configurations, and data sources can be tailored depending on the application you work with.

Security Concerns

Adobe works best on identifying and removing any securing issues when raised. They break down potential threats and security risks into two categories. Priority scale and Severity scale and work on debugging accordingly. With the release of the latest CF version in 2018, some major security issues like deserialization of untrusted data were solved. 

Resolving security threats is a bit of a challenging task for Lucee. Communicating the security issues to its association members takes more time than resolving them. Hence, this process could take a while leading to more complicated issues in-between.

Special features

Compared to Lucee, Adobe ColdFusion carries some special features for the price you pay.

Applications In The Cloud

  • With AWS S3 and Azure Blob, data can be accessed faster. Multi-cloud services accessible with the same syntax and a single line of code to get to different databases.

 

  • AWS DynamoDB and MongoDB are used in Adobe CF to work with large data volumes with a built-in interface for NoSQL databases. Unstructured and structured data can be stored and easily converted into schemas and fields. 

 

  • Simple messaging services through Azure Service Bus and AWS SNS/SQS. Messaging queue services can be accessed easily, transmitting any data volume.

 

  • Relational database services in the cloud at a lower cost via Amazon RDS and Azure database.

 

  • Any type of application or service can be run through ColdFusion codes with AWS Lambda holding no administration and with automatic scaling.

Accelerate DevOps Pipeline

  • All the REST services can be created and managed via the REST Playground.

  

  • CLI and Read-Eval-Print Loop (REPL) Support.

 

  • Create and administer database-independent apps using Object-relational mapping support without writing any SQL.

 

  • Emails can be managed effectively using an SMTP server.

 

  • PDF manipulation with full access to Document Description XML (DDX).

 

  • Mobile apps can be developed via CFML employing Adobe’s built-in integration and Adobe PhoneGap.

Conclusion

Thus, it can be concluded that both Adobe CF and Lucee work well with CFML making them worthwhile. Yet, Lucee can be much cheaper with improved speed and shared hosting. However, with Adobe often upgrading their service with regards to certain aspects like security and some features special on its own when creating enterprise standard applications, it stands better at the price you pay. 

The post Adobe ColdFusion 2018 Versus Lucee appeared first on FusionReactor Observability & APM.

]]>
Accelerate the DevOps Pipeline with ColdFusion Enterprise 2021 https://fusion-reactor.com/blog/evangelism/accelerate-the-devops-pipeline-with-coldfusion-enterprise-2021/ Sun, 01 Nov 2020 11:04:31 +0000 http://fusionreactor.dev.onpressidium.com/?p=57909 Following our recent series on the latest version of ColdFusion Enterprise 2021 (CF2021), which was released a week ago, this segment will highlight how to expedite the DevOps pipeline using the latest release. Among the nearly 60 updates added to … Read More

The post Accelerate the DevOps Pipeline with ColdFusion Enterprise 2021 appeared first on FusionReactor Observability & APM.

]]>

Following our recent series on the latest version of ColdFusion Enterprise 2021 (CF2021), which was released a week ago, this segment will highlight how to expedite the DevOps pipeline using the latest release. Among the nearly 60 updates added to ColdFusion Enterprise 2021, certain features such as the ability to accelerate the processes involved in the development, compilation, and deployment of software stand out the most. The newly added REST Playground functionality comes in handy while handling RESTful services from a single source.

With the ColdFusion Enterprise 2021 edition, you can now write codes once, integrate them faster and deploy them anywhere on the cloud – through the integration of features that allows for the transfer of services from one cloud service provider to another on the fly. The idea of not having to rewrite your code during the transitioning from one hosting platform to another increases scalability and expedites the DevOps Pipeline. 

ColdFusion Devops Image

 

 

 

 

 

 

Features and Functionalities Of The ColdFusion 2021 Version

With the ColdFusion CF2021 Enterprise edition, developers can seamlessly integrate the existing continuous integration and continuous delivery (CI/CD) pipeline to add value to customers at a much faster pace.

1.CF Framework

Unlike previous versions of the ColdFusion development platform, CF2021 allows for server settings from one instance to another, the management of these settings from a single console, and the automation of administrative duties using the CF setup. As a result of this new feature, uniformity in all applications across all servers is guaranteed.Development & Operations Team Diagram

 

 

 

 

 

 

 

 

2.RESTful Playground

Developers can now utilize the RESTful playground to deliver complex applications to collect smaller and independent services. The RESTful playground publishes and grants access to all of your web services across multiple platforms, with fewer lines of code. Utilize the RESTful playground for the creation, management, and maintenance of all your REST services and docker images to full scale. As well as deploy your application in any environment.

3.Command Line Interface and Read-Eval-Print Loop (REPL)

The CF2021 Command Line Interface – CLI and the Read-Eval-Print Loop – REPL support authorizes developers to work with files, databases, and emails or invoke web services through the CFM (ColdFusion Markup Language). Developers can also execute certain functions, for instance, the admin API to script a ColdFusion server setting. Additionally, you can test-drive or learn the CFML with the REPL support in the CLI.Executing Admin APIs through CLI and in REPL mode

 

 

 

 

 

 

Fig 1: Executing Admin APIs through CLI and in REPL mode

 Enter cf.bat and the REPL mode displays.

 

 

 

 Enter cf.bat and the REPL mode displays.

4.Object Relational Mapper

Through the Object-relational Mapping support, developers can develop, scale, and maintain database-specific applications without scripting an SQL index or performing a full-text query of Object Relational Mapper – ORM entities. Using the integrated Lucene search engine and SQL logging, you can obtain on the spot debug information.

5.PDF Manipulation and Standardized PDF Metadata

Although ColdFusion does not provide a complete reference to the LiveCycle Assembler, it allows for document description XML – DDX. As an assertive markup language used to define PDF output files, the DDX functionality on the CF2021 version allow developers to fully leverage access to DDX, which as a result allows you to easily manipulate PDF documents and perform advanced tasks such as adding; bookmarks, comments, file attachments, headers, and footers – with automatic page numbers. 

With CF2021, you can now modify your PDF documents’ look and feel by specifying such metadata as the page, size, margin, and rotation. You can effortlessly create, share, and apply metadata such as authorizing data, keywords, and copyright notice by forwarding metadata between PDF and XMP files and establish a standardized consistency of PDF metadata across your organization. The processddx action can also be used to process DDX instructions without the installation of the LiveCycle Assembler.

6.Email Management

Email management just got even more fun and easy with the novel version of ColdFusion. Developers can now efficiently manage Simple Mail Transfer Protocols – SMTP, with less code. The idea – do more, with less. Easily send email using SMTP servers embedded with ColdFusion Mail – CFMAIL tags. Using ColdFusion Post Office Protocol – CFPOP tags to enable the retrieval of messages by email applications just got easy. You can attach a callback function to the CFMAIL tag to unlock notifications on message delivery. Retrieve mail via a Post Office Protocol – POP mail server with the CFPOP tags by connecting the ColdFusion Internet Message Access Protocol – CFIMAP tag to the Internet Message Access Protocol – IMAP server.

7.HTML-to-PDF Converter

Leverage Adobe’s extensive suite of conversion engines to generate high-quality PDF files from HTML pages. The parsers in the conversion engine resolve the CSS and apply the necessary settings to ensure that the PDF’s content is displayed exactly as is on the web browser. The CF2021 HTML-to-PDF converter help maintains such metadata constraints as layout, formatting, and hyperlinks.

8.CFML-based Mobile Application Development

Just as mobile apps’ demand leans towards an upward trend, so does the mobile application development growth. With the latest version of the ColdFusion Enterprise edition, you can take advantage of your existing CFML knowledge-base to develop mobile applications and in-built leverage integration with the Adobe PhoneGap model to rapidly and easily deploy them to popular mobile applications stores, like iOS AppStore and Android PlayStore.

Conclusion

In conclusion, if you have a dev team that values scalability and efficiency over everything else, then the ColdFusion DevOps model is your best bet. By accelerating your DevOps pipeline with ColdFusion CF2021, you can equip your dev team with the ability to speed up the app creation process, allow test apps and new code in a secure environment, increase productivity, and therefore in turn harmonizes your team into a single unit working together.

The post Accelerate the DevOps Pipeline with ColdFusion Enterprise 2021 appeared first on FusionReactor Observability & APM.

]]>
The Runtime service is not available – ColdFusion 2018 https://fusion-reactor.com/blog/evangelism/the-runtime-service-is-not-available-coldfusion-2018-2/ Wed, 16 Oct 2019 13:10:35 +0000 http://f_reactor.dev.onpressidium.com/?p=42118 The Runtime service is not available – ColdFusion 2018 A few days ago I got an error with my ColdFusion 2018 server which I had not seen in many years: coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Runtime service is not available. at coldfusion.server.ServiceFactory.getRuntimeService(ServiceFactory.java:121) at … Read More

The post The Runtime service is not available – ColdFusion 2018 appeared first on FusionReactor Observability & APM.

]]>

The Runtime service is not available – ColdFusion 2018

A few days ago I got an error with my ColdFusion 2018 server which I had not seen in many years:

coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Runtime service is not available. at coldfusion.server.ServiceFactory.getRuntimeService(ServiceFactory.java:121) at coldfusion.graph.InteractiveGraphingServiceImpl.load(InteractiveGraphingServiceImpl.java:445) at coldfusion.graph.InteractiveGraphingServiceImpl.start(InteractiveGraphingServiceImpl.java:425) at coldfusion.server.CFService.setupGraphing(CFService.java:402) at coldfusion.server.CFService.start(CFService.java:688) at coldfusion.server.j2ee.CFStartUpServlet.startCFService(CFStartUpServlet.java:567) at coldfusion.server.j2ee.CFStartUpServlet.init(CFStartUpServlet.java:510) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121) at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:111) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1124) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1079) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:971) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4886) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at com.adobe.coldfusion.launcher.Launcher.run(Launcher.java:957) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at com.adobe.coldfusion.bootstrap.Bootstrap.init(Bootstrap.java:100) at com.adobe.coldfusion.bootstrap.Bootstrap.main(Bootstrap.java:185)

I had seen this error when running ColdFusion 9 many years ago but not for some time. I could not figure out what I had broken.

After some Googling, it seemed to be that I could have done something when I had installed ColdFusion 2018 Update 4. I could only find old articles on the web like: Why is ColdFusion throwing a 500 Internal Server error after APSB14-23 hotfix installation? but nothing specific, so I tried the following:

cd /opt/coldfusion2018/cfusion/hf-updates/
../../jre/bin/java -jar hotfix-004-314546.jar

After following the updater I checked the update.log which lives in the logs directory. There didn’t seem to be any issues with the update so I tried to start the CF servers again. It did not work. I was presented with lots of exceptions like above and the server didn’t function. I was unable to access the CF admin UI but the logs didn’t tell me what could be wrong. I was very close to reinstalling CF 2018. After some investigation and lots of frustration, I remembered what I had been investigating when I last ran my CF 2018 server. It was the Redis session storage with CF 2018. Specifically related to Performance issue with Redis session management on Adobe ColdFusion servers with FusionReactor or Adobe Performance Monitoring Toolset (PMT). I had configured the session manager as shown below:

I no longer had the local Redis server running (and had uninstalled it), but this was not just affecting sessions, it was completely breaking the CF admin UI preventing me from disabling the Redis session storage.

After some help, I found that I could remove the Redis session manager by editing the lib/neo-runtime.xml file.

I changed the var from:

<var name='sessionStorage'><string>redis</string></var>

to:

<var name='sessionStorage'><string>memory</string></var>

Now the ColdFusion 2018 server starts ?

The post The Runtime service is not available – ColdFusion 2018 appeared first on FusionReactor Observability & APM.

]]>