• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Multiple app pools in IIS

Advisor ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

Hi All,

We have CF2021 in windows  IIS 10 (windows server 2019).

We have 4 sites all in IIS using one application Pool. 

Can we assigned one site to their own application pool for better performance?

I know it was a tomcat limitation before:

Multiple application pools for ColdFusion possible... - Adobe Community - 6246482

Thanks,

Johnny

Views

751

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 05, 2024 Jun 05, 2024

Good to hear, Johnny. And the feature is both well-documented (including use of the wsconfig tool for the new instances). And the cf multi-instance capability has existed for decades, such that you'll find many folks or resources that can help you should you stumble.

 

To be clear, it's simple enough that for those familiar with it (or we together) could have it all configured in less than 15 minutes. But I realize you'll likely prefer to dig in on your own first.

 

I'll add that it's indeed sim

...

Votes

Translate

Translate
Community Expert ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

Yes, Johnny, you can do what you ask. I've had many times where more than one site (running cf) shared a given app pool. There's usually not much advantage to doing that, but yes it's possible. 

 

As for that post you point to, it's about a different use case: they were wanting to have iis "applications" WITHIN a given iis site use a different app pool than the site they were within. You're not referring (above) to doing that, so that discussion does not apply. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

Thanks for your reply and help Charlie.

We are trying to isolate each site, if one have performance issue the other three are not affected.

Do you have a article that shows how to config each CF site in IIS with their own application pool?

--+ website root [pool_root]

  |- appl_one [pool_one]

  |- appl_two [pool_two]

  |- appl_three [pool_three]

Thanks,

Johnny

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

Well, wait. Your opening message referred to "4 sites", and the words in this last reply refer to multiple sites--but then your pictorial representation refers to "appl"s, listed under a site.

 

So can you clarify if you really mean sites or applications (which from an iis perspective are folders under a site that are marked to be special, including the prospect of changing their app pool).

 

To be clear, the default behavior in iis is that each site does have its own app pool, for the very isolation you seek.

 

That said, most cf problems don't really stem from decisions about app pool configuration but instead about processing within cf, or in things the cf code tells cf to talk to. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

Charlie,

Sorry for the confusion. We have one IIS application and under there 4 sites using sub domains (myDomain.com/site1, myDomain.com/site2... as you see in the attached image.)

 

The main idea is to isolate the sites for better performance, we don't want all stop is one have issues.

Is there a way in CF setting to allow each site to work in a way that all are not affected at the same time? 

All our sites are heavy in loading data from Oracle. One site use a lot cfthreads. Do I need to look more into CF settings? any suggestions?

Thanks

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

Well, no (in answer to your first question). Not in iis nor in cf. And "maybe" to your second question. More on that in a moment. 

 

1a) First from an iis perspective, you're now admitting to wanting to do create what you call different "sites" but you really mean just 4 folders under one IIS site, which you/your users regard to be different "sites" from each other. So you just have one site, to IIS. (That's what started our confusion here.)

 

And you're wondering if you can somehow separate those folders into different app pools. While IIS would allow that (you modify the folders in the IIS UI to become "applications"), and you could even change their app pool to be something else, the problem with CF (really a Tomcat problem) is that you can't then make that app pool change at the subfolder/app level.

 

This is that other thread from 10 years ago said was discussing. And I have confirmed that's still true: you won't be able to have separate app pools for each "application" within an IIS "site". And I can clarify that it's related to something discussed in another thread here in the forums just this week: I explained there that when a CF page is requested, under the covers IIS makes a request for a /jakart/isapi_redirect.dll url also.

 

And it's because of THAT request that things would fail, because THAT request will be done under the app pool of the site...even though you may change the app pool for a folder/application to be a different app pool. That's what leads to the error in IIS, which is 403.18 code reporting, "An ISAPI filter or custom module changed the URL to run in a different application pool than the original URL."  (And technically, because you can't change ISAP Filters at the IIS "application" level, you also can't change the connector for this "application" to to point a different URL for calling that dll. I won't elaborate any further as this is getting a bit off-topic and deep in the weeds.)

 

1b) As an alternative, for someone in Johnny's situation, you COULD instead create a separate IIS "site" for each thing you call an "application". Each of those could have their own different subdomain or even new domain. Then each of those sites could have its own app pool, for whatever that's worth.

 

(Can you do it easily when you may prefer urls that are domainx/sitey1, domainx/sitey2? Well, yes, it's POSSIBLE. You could do a redirect from those urls to a truly separate site for each, with a separate SUBDOMAIN, as in sitey1.domainx and sitey2.domainx). 

 

Then more important perhaps, from a cf perspective (and the meat of this latest question you've just asked), you COULD then separate each of those different SITES to be connected to separate cf INSTANCES. Those instances would indeed be separate from each other, separately able to be stopped/started, separate cf admins, and so on. Those could be running on the same server as each other, or on different machines (for even more separation--though you'd need to license cf on each separate machine). 

 

As for running more than one cf instance on a single machine, sadly if you're running cf with the lower cost Standard license, that only supports a single instance per machine. If instead you have the cf Enterprise edition, that can support any number of instances on a single machine. But Enterprise is 4x the cost of Standard. (You can also at least DEMONSTRATE the capability using the free CF Developer or trial editions.)

 

You could also do that with Lucee, the open source alternative implementation of a cfml engine (not from Adobe, and not committed to being 100% compatible--though some find their apps work fine, or are willing to do the work to get their app running, for the license cost savings as in a situation above).

 

2) So finally, what can be done if you're in a situation where you can't do anything but run cf as you have it? You can focus on making the problems go away that are motivating this situation. I help people do that daily (carehart.org/consulting), so I know it's possible. And yes, it could be about configuration or it can have other explanations and solutions. But I'm not denying the value in wanting to separate the instances as you seek.

 

Above are the options as I see it. (At some point I do hope to double check if the assertion from Anit of 10 years ago in that other thread is still true. Even if that works, though, it only would let you separate app pools within a cf site, but again most cf perf problems are not caused or solved by that.)

 

Let us know what you think. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

I want to try you 1b solution creating separates INSTANCES since we have CF enterprise.

Is there an article in how to setup multiple instances in the same server?

how can I connect each instance to each site in IIS? 

 

Good to know that you can help as consulting, I will keep you contact.

Thanks !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

Good to hear, Johnny. And the feature is both well-documented (including use of the wsconfig tool for the new instances). And the cf multi-instance capability has existed for decades, such that you'll find many folks or resources that can help you should you stumble.

 

To be clear, it's simple enough that for those familiar with it (or we together) could have it all configured in less than 15 minutes. But I realize you'll likely prefer to dig in on your own first.

 

I'll add that it's indeed simple to create the separate cf instances and to run the cf wsconfig tool, to point to separate sites in iis. It's also easy to create sites in iis, once you have the domains or  subdomains you want to use. 

 

That said, there can be challenges with the setup of dns (if using new domains or subdomains), as well as ensuring your app/code works well with that new domain/subdomain. For some apps, it's trivial to accommodate, while for others it can be a larger challenge, depending on the level of hard-coded use of domain names in links, etc.

 

Again z I can help with finding and resolving such problems, sometimes more quickly/efficiently than how some devs on their own would try to solve such problems. There's no easy way to estimate that effort up front, but it shouldn't be a monumental effort, and again for some it's truly trivial. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 06, 2024 Jun 06, 2024

Copy link to clipboard

Copied

Charlie,

"I'll add that it's indeed simple to create the separate cf instances and to run the cf wsconfig tool, to point to separate sites in iis. It's also easy to create sites in iis, once you have the domains or  subdomains you want to use. "

I got back to my initial issue that I can only have one domain or one site in IIS for now, checking with management if we can request new sub domains.

In the meantime I create two cf instances in my test environment, when I run the wsconfig it only shows one site for IIS, I selected All option, it shows like two connection (see image)

 

jfb00_0-1717675584422.png

My IIS configuration will remain the same, the sites are coming fine.

I can configure my db source for each cf site inside of each cf instance. 

Is this a correct configuration? 

Or, do I need to have separate sites in IIS?

Thanks to you, I am learning a lot this couple days.

Best,

Johnny

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 06, 2024 Jun 06, 2024

Copy link to clipboard

Copied

I sent the message to soon, after closing the wsconfig the other site disapear.

We need to have two IIS sites, i did the full test and show like this:

jfb00_0-1717679838074.png

Need to wait on subdomains approval and we should be good to go, thanks again Charlie.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2024 Jun 06, 2024

Copy link to clipboard

Copied

LATEST

Johnny, glad to see you're on your way to having things as you want. To clarify for other readers, you first had your wsconfig set to connect "all" sites, and now that you show connecting your two individual sites, you clearly had to REMOVE that "all" connection, to end up with the two you have.

 

And yes, if one wants to change from one connector for all sites to separate connectors for some sites, you do need to remove the "all" in order to have the wsconfig tool show the option to select any one (and this is whether someone wants to connect individual sites to different cf instances or just a single cf instance). 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

IIS uses application pools to isolate ASP.NET applications running in process. That won't have much (any?) effect for Java applications run out of process. Java and .NET are two different things. IIS simply hands over control of the CF application to the CF server, which has its own memory allocation and isolation. Like @Charlie Arehart said, if you have CF Enterprise then you can run separate CF instances which will be isolated. If you don't, then you can't.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 06, 2024 Jun 06, 2024

Copy link to clipboard

Copied

Thanks for you reply and help Dave.

It is clear this for me, best.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

I've tweaked on of my replies above to offer a bit more clarification on why it is that we can't have IIS "applications" (folders within a site) be configured to use a different IIS "application pool" than that of the site they are in. This is what was discussed in the 2014 thread that Johnny originally pointed to, but the point I make above wasn't made there: that the issue is about the /jakarta/isapi_redirect.dll call (which CF makes on each cfm page call), and that that can't be in a different app pool than the folder serving the CF page.

 

But since Johnny's considering the alternative approach I posed (creating new sites, and perhaps even separate CF instances), I offer this elaboration more for others who may find this thread in the future. (But I'm adding this note as a comment separately, to help any folks who'd already read this thread in recent days, who wouldn't otherwise know I'd revised that answer.)


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation