The Service is Unavailable on only one or two sites

Running Lucee 6.2 on windows server 2022 with IIS in an EC2 instance.
Apache Tomcat 9.0.62 Server
java 23.0.2 2025-01-21

I am running over 100 websites through Lucee, single context. At random times, one, two or three sites will stop working with “The Service is Unavailable” while all other sites are still running fine.

When this happens, .html pages will work fine on those sites but not .cfm pages.

Restarting IIS does not help, recycling application pool also does not help.

Restarting Apache Tomcat service gets the sites working again, but obviously it restarts all sites when only 2 or 3 out of 100+ are not working.

Any idea why a single site would be unavailable when all others are fine? Or how to restart a single site without restarting all?

Thank you

There must be some clues in either the tomcat/logs or lucee-server/context/logs?

I’d also recommend updating your Tomcat, that’s quite an old version, especially as you are running java 23, you’re missing out on the virtual thread goodness available in Tomcat 11

Appreciate the advice. I was JUST reading about upgrading tomcat to 11 then I saw some posts that said lucee 6 doesn’t support it (from dec 2024). I’ll look into it further.

I’ve also searched logs, but don’t know what I’m looking for, to be fair. I tried searching for the domain name in question and got no results in either folder.

Thanks for taking the time to reply.

I’d be starting with the Lucee exception.log

Tomcat 9.062 has massive security issues, multiple performance issues.

Upgrade to the latest version of Tomcat.

If you want to go beta, Lucee 7 is running Tomcat 11. It has some breaking changes, so look at the documentation and test - but I am using it in production and its rock solid and significantly faster than Tomcat 9

Any advice on the best approach to the Tomcat upgrade? I know there is a windows exe installer for Tomcat 11, which I can install beside 9 if I’m not mistaken, then I would have to tell lucee to use 11 instead?

or is there a preferred upgrade method? Apologies, I have only upgraded lucee through the admin when necessary.

The highly unofficial method i use on windows is

copy the lucee install directory, to lucee_sav
so it lucee is c:\lucee you have a copy on c:\lucee_sav

stop the service if its running as a service

Run the installer or unzip the express version (which ever you are usiing)
start lucee
confirm it started and is working as expected.
stop lucee
copy the files that where touched back over to the"Root" folder. , ie Application.cfc and Index.cfm
check server.xml and if needed add the changed lines from lucee_copy to lucee
Start Lucee

1 Like

Appreciate you, sir. I’ll look into this.

@gkyle001, back to your original problem (and assuming these upgrades don’t help), I’d think the next step would be for you to confirm for us how iis (in your case, or apache for others) is connecting to Lucee. There are options and it may guide us finding a solution.

1 ) You don’t mention if you’re using the boncode connector for iis. Are you? (Or might you be using the IIS ARR feature z which allows you to do rewrites directly to the Lucee’s internal/tomcat web server?)

(Those using apache would want to see the httpd.conf or any “included” conf files for the lines related to Lucee/tomcat and cfm request processing, as also shown in the Lucee docs.)

The point is that the connection could be made either by AJP or not, and there would be a tomcat “connector” on the receiving end in Lucee’s server.xml–one (at least) for AJP and one for http, each of which itself has tunable settings

Since you have so many sites, it could be that connection slots are exhausted for some requests, thus leading to your error. What to do will depend on your configuration (in the apache end and in the Lucee/tomcat end) as well as any diagnostics you may find per the logs as Zac suggested.

Options include raising the number of threads, decreasing the timeout for unused connections, creating new connectors, and more. Same for boncode configurable settings. There’s no single obvious solution.

  1. And of course there’s no substitute for diagnostics in a case like this.

First note that boncode has configurable logging, if you’re using that.

And when I first wrote this reply, I thought you were using apache (see my newer reply below). I’d written this next paragraph then. I will leave it for those using apache. I don’t THINK the Tomcat status worker feature works for boncode. Anyone who knows can correct me and I hope to try it later today.

If in using Apache as w web server you find you are indeed using AJP (many do), there’s the option to enable tomcat’s “status worker” feature, which is a monitor of such connections. Besides tomcat’s docs on the feature, I have a blog post with quite a bit more info on the feature, including some challenges and suggestions. Though the post is from 2015, the info still applies. (And while it was focused on cf and iis, indeed elaborating on an Adobe post on the topic, I did indicate how it would benefit Lucee users using apache and AJP just as well.) Finally there’s also potential value for apache users to use Apache’s mod_status feature, as I also point to in my post.

IIS users should consider also using the iis worker process monitor, and its ability to show running requests. That must be enabled in windows server manager (for those on windows server) or “turn on windows features” (for those on windows desktop).

I appreciate these tools may NOT help for your problem. I add them at the end here as just possible additional tools, if the logs or other configuration considerations above don’t help. Or maybe we’ll find someone here gets you to just the right solution.

1 Like
1 Like

Doh! After posting that note I saw you said you were in fact using iis. Sorry. The reference to apache (about tomcat) was stuck in my head as I wrote.

Good news is that the concepts and indeed the tool I wrote about applies to iis just as well. I’ll revise my reply above next, for the sake of those who’ve not yet seen it. But I didn’t want to do that without saying this, as some get emailed any posts–but they’re NOT sent an email about updates within posts.

2 Likes