Lucee vs CF performance under load

We had 2 CF servers behind a load balancer. We are now migrating to Lucee. As part of this, we migrated one server to Lucee; so now we have 1 CF and 1 Lucee server.

The server serves just a couple of web pages… with each request taking just a few millisecs. But the server gets a ton of requests… with requests peaking at a few thousand requests/minute a few times in a day.

I have request throttling configured in CF as well as Lucee. So ideally I should be seeing some requests coming through steadily and the other requests in a queue. But what we observe is that CF handles the requests/queuing properly whereas Lucee does not seem to be doing that. Lucee seems to be trying to process all requests at the same time and eventually starts throwing 503 errors.

In Lucee Admin I have Maximal concurrent requests set at 100. and concurrent request timeout at 5 minutes.
In CF I have “maximum number of simultaneous template requests” set to 25. And “Timeout requests waiting in queue after” 60 secs.

Even tho these numbers are different right now I have tried 25 requests/60 secs in Lucee also but it did not make any difference.

The IIS app pool/site settings are the same on both servers.
Tomcat/ Boncode max connections is at 1000.

Any pointers on what else I need to configure to get Lucee to queue excessive requests just like CF and not try to process everything at the same time?

Don’t forget to tell us about your stack!

OS: Windows 2022 / IIS
Java Version: 21.0.6
Tomcat Version: Tomcat/10.1.36
Lucee Version: 6.2.0.321

How many cores are you running?

Why 25 for ACF and 100 for Lucee?

Also why not 6.2.2.91

2 vcpu on AWS EC2 instance with 8GB memory.

Like I said in my earlier post, at present I am at 100 for Lucee but have tried 25, 50 - makes no difference… see same pattern.

Will 6.2.0 vs 6.2.2 make any difference in this? If so, I can definitely try it out.

I just tested the queue with jmeter and tomcat directly and it works as expected.

With 2 cores, Lucee can only process 2 requests at a time, unless you are using an external service like db or S3 there’s only so much a small server can do concurrently. With external services threads can sleep while waiting for responses

As for 6.2.2 why waste your time on tech debt? :grinning:

Use jcmd thread.print to check what’s actually going on, you might have threads blocking each other

@Zackster Thanks so much for your responses. Really appreciate it.

I will try jcmd thread.print next time this happens. and also try upgrading to 6.2.2.

What were your tomcat settings like when you tested?

I did max 3 requests

image

calling this script via jmeter

<cfscript>
	flush;
	sleep(500);
	systemOutput("req.cfm @ " & now(), true);
</cfscript>

nothing else

monitored by running tomcat in the console catalina run

1 Like

I’m really interested in learning what you discover along the way to solving this, please share details

Happy to answer any questions or provide further ideas to figure out a solution

2 Likes

could you add a button to analyse cpu/memory on the machine and give an advisory to what settings should be with a ‘yeah do that’ button also, that could be a great feature :wink: