[Looking for Charlie's main web site?]

When problems are not due to CF, but may be in the web server (and a hat-tip to IIS 7)

Note: This blog post is from 2011. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Sometimes, CF problems are not really CF problems. Here's a little vignette from a recent consulting engagement (where I provide fast, on-demand CF troubleshooting services).

The challenge

I had a customer contact me recently because their server was performing poorly. They were experiencing significant latency on many requests. They were inclined to think they needed to change something in their application or SQL (as most presume when things go amiss).

I helped them determine ultimately that the problem was not CF at all, but instead something amiss in their web server, in this case Apache. (Before any Apache defenders come at me, please: I'm not "hatin' on Apache", just reporting what we observed. Do keep reading for more details.)

I asked if they'd considered at least trying IIS to confirm if it might work better for this challenge, but they preferred the file-based configurability of Apache. While I noted that IIS had gotten better in recent years in that regard, they preferred to bring in some experienced Apache guys to sort things out. (I don't claim any particular expertise with Apache, and I'm not at all averse to letting a customer know when they may need to have someone else help with certain problems.)

The customer's first attempt at resolution

The Apache consultants identified some configuration changes which they asserted were undocumented, but felt were required to get past an issue happening on this Windows 2008 R2 setup:

  • UseCanonicalName - needs to be on
  • httpd-mpm.conf - needs to be included in apache config
  • EnableMMAP - needs to be off
  • EnableSendfile - needs to be off

I'm not verifying or confirming the validity of these suggestions, just reporting what the customer was told, if it may help anyone.

Anyway, it worked for a brief while, but the problem soon hit my customer again. (If any Apache folks want to offer any thoughts based on this limited info, feel free. Again, I'm not writing this to knock Apache.)

The customer's reconsideration of my suggestion

At that point they recalled my suggestion a few days before about at least giving IIS7 a try.

They reported their success with that:

"We read up on IIS installation and had things and running in about 45 minutes, and it was screaming. We moved all of our servers to IIS over the next few days. You were so right, IIS7 is a great piece of software and is super fast!

I really thought that getting the rewrites and redirect stuff set up would be a pain, but it wasn't. Even though I prefer a config file for portability and archive purposes, I do like the gui.

So, thanks for everything: keeping us from second guessing our application and for putting the IIS bug in our ear!"

Just in a day's work, my good man. :-)

Seriously, though often I do help people find and resolve problems within CF (more often in configuration than in code), I do also occasionally help demonstrate that a problem is not related to CF at all. It instead is a victim. And indeed, in many environments, it's the "red-headed step child" who gets blamed for everything first.

Let me know if I can help you

So if you may ever need help trying to understand and resolve a problem of CF performance, let me help. My goal is to work fast, generally on-demand, and to not only help solve the problem but to help educate you so you can better understand the available diagnostics, and connect the dots, so as to be able to solve such problems yourself in the future.

And as in this case, sometimes the assistance simply helps get the monkey off your (or CF's) back and into someone else's lap, when we can demonstrate that clearly.

If you may be interested in seeing some other customer reference stories, check out a page with some of them.

For more content like this from Charlie Arehart: Need more help with problems?
  • If you may prefer direct help, rather than digging around here/elsewhere or via comments, he can help via his online consulting services
  • See that page for more on how he can help a) over the web, safely and securely, b) usually very quickly, c) teaching you along the way, and d) with satisfaction guaranteed
Comments
oh Charlie, I can't believe you're solution to a slow system was to throw a monstrosity of kludge as IIS7 at it. Yuck!

Anyway, I'm glad it worked for your customers, but I can only imagine what kind of headaches IIS7 will bring down the road.
I have seen this same result with ColdFusion 7. I don't think there is anything wrong with Apache at all I just think that the JRun connector for Apache that Adobe provide for Windows is not good enough. Apache with CF in a Nix environment is fine, but I wont be using CF with Apache on Windows again in a hurry.
# Posted By Simon Baynes | 6/20/11 4:07 AM
@Marlon, if you reread the entry, you'll see that IIS 7 wasn't my "solution to a slow system". We determined that there was a problem with serving pages via Apache (the pages were responding fast within CF itself, according to several measures).

What I suggested was merely that they might *try* IIS 7 (they were of course already on Windows), just to see if THAT problem went away.

If it did, as in this case it did, are you saying that it would be unwise to go with that solution? that instead they should suffer as long as it takes to get to the bottom of whatever was amiss? They were in quite desperate shape to get the server responding for their important business functions.

As for why I wrote here, as I went on to add, if perhaps something could be determined to help those with this configuration, I'm happy to have it be shared here with everyone, and of course I'd get it back to the client.

Then again, Marlon, you conclude "I can only imagine what kind of headaches IIS7 will bring down the road." On what basis do you make that assertion? Are you writing that with knowledge of issues with II 7? Or just as an Apache fan who can't believe anyone would run on IIS? or perhaps also an *nix fan, who holds it against those who run CF on Windows? Just want to understand where you're coming from. Two paragraphs don't convey enough for us to appreciate the value of your contention. :-)
@Simon, sure, fair enough. Yes, yet another way to try to solve the problem could have been to take JRun (and its web server connector) out of the picture. Again, I was trying to share a unubtrusive quick fix.

Of course, you have to be running Enterprise in order to run CF on any other servlet engine/JEE server. But it's an alternative worth keeping in mind, for someone in such a situation, to keep that in mind as an option. (And of course the next release of CF, Zeus, will do that for us, running as it will on Tomcat instead.)

Then again, you refer to running CF on *nix, and your happiness with that. Fair enough: this customer was on Windows, and I was just trying to offer them a simple idea to try. They ultimately did, and they were happy with it, and I wanted to share that. Getting them to switch to *nix wasn't likely going to be well-received. :-) That said, maybe you're just hinting that "if people would only stop running CF on Windows, they wouldn't have all these problems".

Going back to my comment above to Marlon, while many people do love and prefer running on *nix, just know that there are also many people (indeed, I'd say most) running CF very happily on Windows, in production, and yes even under high performance. I think many people don't realize that (or think it's possible). I work with about a hundred customer a year, and I see all sorts of configurations. Whatever the setup, I can nearly always leave them with a better-running system. The OS and web server choice rarely is the root cause of any problems. I'm serious.

One more thing, Simon: you say you "have seen this same result with CF7". What do you mean, though? running CF7 with Apache on Win2k8R2? Or do you just mean general slowness of applications? If so, I'll say again that there are often MANY other explanations for that, which should be explored before considering the web server/connector itself to be the cause. That's indeed what I do, all day each day, for my customers.

In 95% of my engagements, I can help find and resolve the specific things that are amiss, and it's nearly always some aspect of CF configuration, or some other aspect of configuration (database server, web server, etc.), or perhaps coding. In this case, there wasn't an obvious solution.

But I write here (both entries and such extended comments) as well as on mailing lists, forums, and twitter, all in the hope of advancing knowledge among CFers. What I hope to communicate is that people should use diagnostics to find, understand, and resolve problems. And when that doesn't work, as in this case, they should be prepared to try thinking "outside the box"--even if that may mean challenging long-held stereotypes. :-)
@charlie I may have been a bit misleading in my comment. I am not running on a *Nix environment I just stated that in my experience that the JRun connector for Apache on Windows is not for purpose once the load increases, I have never heard anyone complain about Apache and CF on *Nix so that is an assumption of mine. I was running CF7 on Windows 2003 with Apache and had a lot of performance problems. I spent my life in FusionReactor trying to solve the problem, and you could see that CF finished with the request and Apache seemed to hold onto it for ages. I did a side by side comparison of Apache and IIS6 under a load test and IIS6 was 3 times faster for our setup, so it was indeed a no-brainer.

I have not returned to Apache with CF 8 or 9, but I am assuming your client is suing one of these so it appears that Adobe have never dealt with the issue.
# Posted By Simon Baynes | 6/20/11 12:20 PM
@Simon, ah, ok, so you weren't so much saying that you prefer *nix, but more were just saying that while you're not using it you'd not heard of people with it having the problems that you did see (and this customer did), where performance was bad due specifically to something in the CF/Apache web server connector. moreover, you're saying you observed also that things were much better with IIS.

Fair enough. So sure, perhaps there is some issue that Adobe could explore/address. I suppose they need more specific demonstrable test cases.

Until then, my point here was just to say, "hey, if/until that's solved, do consider that an alternative web server may work". IIS is the main alternative, which is the only reason I mentioned it. And since some have formed opinions over it over the years which may no longer be deserved, just as others have with CF, I wanted here to propose that idea and this customer's happiness with it.

As for your comment, and my wondering if it was purely pro-*nix, I may indeed have read more into what you were conveying, especially in light of Marlon's note, both of which I saw at the same time this morning. :-)

Even so, perhaps the info we've shared (in all the comments) will help some readers, so that makes the back and forth worthwhile. Cheers.
@charlie -- actually I'm an nginx fan :) I'd used IIS up until version 6 on my Win/CF servers, but once IIS7 came out, it was a painfully slow experience to get it configured on my servers. My experience is that IIS is only getting bigger instead of leaner with each iteration. IIS also is very asp.net centric and has a lot of components installed with that in mind. All this adds up to more attack vectors, in my mind.

Just for grins, you could see how a simple reverse proxy setup w/Apache would work. It could tell you if it was the connector or not.

now, I guess you could take this all with a grain of salt since I haven't been deploying any windows servers as of late so things might have changed since then.

Next time though, suggest nginx! :)
Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting