I’ve set up a Lucee server on Windows Server 2019 and configured it to run through both IIS and Tomcat. I created a simple HTML form to upload a file to an empty .cfm file. When I upload a 100MB zip file, the upload takes significantly longer when going through IIS compared to directly through Tomcat.
Here are the steps to reproduce the issue:
Install IIS with Lucee: I used the Lucee installer (version 5.4.3.2) for Windows x64.
4. clear index.cfm keep content empty
5. upload 100mb zip or any type in 100 ms
result :
target 127.0.0.1/index.cfm takes **26 sec**
target 127.0.0.1:8888/index.cfm takes **1 sec**
*Don't forget to tell us about your stack!*
**OS**: Windows Server 2019 (10.0) 64bit
**Java Version**: 11.0.20 (Eclipse Adoptium) 64bit
**Tomcat Version**: Apache Tomcat/9.0.78
**Lucee Version**: 5.4.3.2
While there’s much that some may want to consider, ask, or proopose, let’s follow through first on your having found discussions that led you to point out the use of ::1 in the server.xml, which we’ll assume you did on the Ajp connector line.
Can you try simply duplicating that line, with the other using 127.0.0.1? Then restart tomcat/lucee, and try the test again.
If it helps, we can elaborate. If it does not, we can move on. Other questions could be:
are you using the boncode connector? With all default config?
Was this a new machine without any prior lucee or cf install?
Nothing in the web.config of the site web root that might be leftover from when the code was on another machine?
If you try a 10mb or 50mb do the times change at the same ratio?
I could go on, but perhaps the very first suggestion will do the trick. Or others may point you in still other directions.
I think I had once a similar experience because of the default PacketSize configuration of the AJP connector. Try increasing the packetSize in the AJP Boncode setting and IIS. I’d also activate Boncode Logging and have a look into that.
I’ve been experiencing slow upload speeds and significant memory usage by w3wp.exe when using the AJP connector. This occurs particularly when handling large file uploads and downloads. For instance, upload 500MB file or <cfcontent> to provide a 500MB ZIP file for download, w3wp.exe’s memory increases by 500MB.
Is there anyone who can provide a configuration example for setting up IIS as a reverse proxy to Lucee? Your assistance would be greatly appreciated.
Setting up iis to support reverse proxy requires installing its ARR (Application Request Routing functionality). Then you can setup a url rewrite rule that forwards to the http connector port in your server.xml (not the AJP port), likely 8009. There’s nothing about this that’s special/different for Lucee than any other setup you will read about if you Google iis reverse proxying using ARR.
Some will want you to know that yet another option is to use nginx or apache instead of iis, as again there are ample resources online showing the config for setting those up to reverse proxy to a web server like that in tomcat/lucee.
One last thing: as for your slow uploads, since changing the address on the AJP port did not help (assuming you restarted lucee as I suggested), what domain are you using to make then request? Localhost, or an ip, domain or machine name? Does the speed change at all if you change to one of those others? Worth a shot, even if it seems unlikely to matter.
My testing has been done using 127.0.0.1 with the AJP connector, and the slow upload issue persists.
It seems that the AJP connector might indeed be the problem in my case. I appreciate your suggestions
I appreciate your suggestions and input. However, it’s worth noting that I encountered these performance issues right after the default installation, which suggests that there might be a configuration or compatibility issue. I would be grateful for any assistance from those with experience or insights into troubleshooting such issues.
i’m going to just be blunt and straight to the point. IIS is an absolute PIG (like everything Microsoft). I ran windows servers for 20 years and I’ve learned that it’s a fight I don’t wanna be in to ultimately find out you literally can’t do some things on a Microsoft platforms that are often superceded by globlal settings such as the global .xml configuration in IIS.
I recently got off windows and I’m kicking myself for not having done it sooner Linux/Tomcat simply handles network better. In theory and in many online test results you will find it pulling somewhat even but as you can see your real world scenario is not. I’m not blaming you I’m just explaining it without any fluff. If I watch the upload streams to my windows servers (I still run a few) the signal is a sloppy dirty mess where as the signal pattern that is Tomcat/Linux based is solid and consistent.
That aside you are probably dealing with an IIS throttling issue and/or multi thread issue. There are global settings to dig into that are likely superseding your configuations.
The bottom line is you’re going to be in for a fight whenever you deal with Microsoft mentality. I understand this is a generalization however the amount of time you spent fighting with Microsoft it’s absolutely not worth it. So you have a choice of continuing to fight it out with Microsoft (which will probably lead to a dead end ) or not.
I know that’s not exactly the answer you were looking for… But it does hilight throttling/multithreading issue. Chances are it has nothing to do with Lucee. For example using drop zone JS you can specify chunks sizes but ultimately the receiving server IIS is more often the bottleneck…
It seems they don’t want to do diagnosis. They just want “the answer”. I’ve offered several diagnostics as well which they’ve ignored/eschewed. You can lead a horse to water…
Right… but can you feel the level of frustrating in what should be a straight forward process. it’s been 20+ years of mainstream internet/IT. Yet, microsoft still entangles the most basic of operations. We should be way past having to sniff out stuff like this. microsoft thinks they are adding value when the result is ALWAYS more complicated than it needs to be ( Leading to this conversation ).
I know this may seem Excessive about MS on my part: But the farther I get away from them the better my world gets.
I want to express my gratitude for your assistance and the valuable suggestions you’ve provided. It’s important to note that I’m working with default settings and have encountered this issue. I truly appreciate your efforts to help, and I will not continue to explore solutions related to the AJP connector’s performance with Lucee and IIS.
Yep, nginx will work to avoid ajp, if that was indeed the issue. Using iis ARR would also have ruled out if ajp was the culprit. Hope things “just work” for you with nginx, and perhaps others interested in this matter with iis can revive this in the future. Thanks for your previous kind note, as well.
This is the wrong file. As far as I know, these are installation files. Please look if you can find this file in c:\windows. Directory
However, if you are moving to ngnix you won’t need to do any of this. i’m ust posting it for completeness.
I’d also like to note that I use Windows and Linux, and I like them both equaly, and each of those have pros and cons… I’d also like to mention that Tomcat is not a Linux webserver and thus its not an alternative for IIS (as it isn’t also an alternative to Apache webserver). Tomcat is a JVM servlet engine that can act as a web server, but it hasn’t all the functionality of a webserver. So, if you don’t want to use IIS, run Lucee with CommandBox that comes with a the sevlet engine Wildfly, and @bdw429s implemented awesome configuration stuff to run it as a fronted web server. You can even do basic auth if you want to by setting up a very simple server.json configuration file.