this.requestTimeout is ignored for file uploads

We’ve run into an odd issue with timeouts and file uploads. In our code we have this.requestTimeout set to 5 minutes. Some of our users outside of the US (our servers are located in the US) were getting occasional errors when uploading files in our application. We’ve discovered that the timeout declared in our code does not apply to the time spent uploading files. But the timeout in the Lucee admin does apply. This makes some sense to me - Tomcat or Lucee is handing the upload before processing any of our code in application.cfc, which is where the timeout gets set.

So users with slow internet (mainly our users outside the US) were running into the default timeout of 50 seconds that is set in the Lucee admin. I prefer to have all our Lucee config settings in code, but for now we’ve solved the problem by bumping up the timeout in the Lucee admin.

So is it working as intended? Or should the timeout set in the code apply somehow? The timeout setting is working for other requests.

I’m sure this will be a tricky or perhaps impossible problem to solve. Maybe at minimum the documentation should be updated? The Lucee Lockdown Guide suggests reducing this timeout down even more from the 50 second default. This will make the problem occur more frequently. So maybe there should be a caveat in there.

OS: Windows Server 2016
Java Version: 11.0.17
Tomcat Version: 9.0.65
Lucee Version:

We have a ticket about this [LDEV-3741] - Lucee

can you share a stacktrace?

@stillnet Can you share your test code to replicate this issue?

Here is some of the stacktrace. Fusion Reactor muddies it up a bit.

And the profiler information might be useful:

I don’t have code to reproduce, but I can reproduce it anywhere in our system that allows file uploads. I used Chrome dev tools to throttle my network connection to 3G speeds, then upload a 5MB file. If the file upload takes longer than the request timeout defined in the Lucee admin, an exception will occur.

I’ve checked this issue with both the lucee version and I set the Request timeout in both ‘server admin(requestTimeout = 50s)’ and ‘Application.cfc(this.requestTimeout=createTimeSpan(0,0,5,0)).’ Then I uploading the file, it works as per the ‘application.cfc’ requestTimeout settings.

once the uploading file takes longer than the request timeout defined in the application.cfc means, it throws a timeout error

Maybe it’s related to the Tomcat version.