Performance issue with Lucee, AJP, and IIS

I’m glad I can help. If you need help with anything else, I’m available.

2 Likes

I am using PLUpload to chunk the uploading of large files using IIS 10.0 and Lucee 5.3.10.97. I have implemented the changes specified in this thread and have definitely seen an improvement, in particular with the writing of the chunks for my upload, however, the chunk writing to disk is still significantly slower than when I was using ACF. I have adjusted the chunk size from 1mb all the way to 20mb. Obviously the writing is faster with smaller chunks, but the number of additional writes ultimately results in the same problem. This slow chunk writing significantly affects the overall performance of the upload. Any ideas on additional changes that could be beneficial? Thanks in advance!

My BonCodeAJP13.settings:

<Settings>
	<Port>8009</Port>
	<Server>::1</Server>
	<LogLevel>0</LogLevel>
	<LogDir>e:\lucee\boncode_log</LogDir>
	<EnableRemoteAdmin>True</EnableRemoteAdmin>
	<EnableHeaderDataSupport>True</EnableHeaderDataSupport>
	<ForceSecureSession>False</ForceSecureSession>
	<AllowEmptyHeaders>False</AllowEmptyHeaders>
	<ModCFMLSecret>xxxxxx</ModCFMLSecret>
	<RequestSecret>xxxxxx</RequestSecret>
	<MaxConnections>5000</MaxConnections>
	<PacketSize>65536</PacketSize>
	<EnableAggressiveGC>true</EnableAggressiveGC>
</Settings>

My server.xml AJP settings:

    <Connector protocol="AJP/1.3"
	port="8009"
	secret="xxxxxx"
	secretRequired="true"
	debug="0"
        redirectPort="8443"
	maxThreads="5000"
	connectionTimeout="20000"
	keepAliveTimeout="-1"
	packetSize="65536"
	address="::1" 
	maxConnections="5000" />

Hello, please refer to this article:

When uploading or downloading files, the w3wp.exe process increases in memory size proportionate to the file size. However, if files are processed directly through Tomcat on port 8888, there are no memory issues.

In Lucee, any CFM file can accept file uploads, and continuously calling arbitrary CFM files via IIS AJP may cause the server’s memory to increase quickly, resulting in w3wp.exe not being able to free up memory fast enough.

I eventually resolved the issue using an IIS reverse proxy or Nginx reverse proxy to Tomcat on port 8888

Thank you for the information. Unfortunately, creating another server for reverse proxy is not an option. Would using Apache, on the same Windows Server instead of IIS likely resolve the problem with the slow writing of chunks to disk? Just a note, I resized the machine (Azure VM) to ensure that disk and memory speeds were appropriate and still had the same issue.

What I think @gaia-jyh was trying to suggest is not installing another server, but connecting IIS with reserve proxy (as an alternative to AJP)

Ok. I will give that a shot. Thank you for the clarification.