Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onerror requestTimeout should increase user defined value #1056

Closed
chapmandu opened this issue Jan 22, 2021 · 1 comment
Closed

onerror requestTimeout should increase user defined value #1056

chapmandu opened this issue Jan 22, 2021 · 1 comment

Comments

@chapmandu
Copy link
Contributor

chapmandu commented Jan 22, 2021

In the wheels/events/onerror.cfm file, there is a hard-coded requestTimeout value of 70 seconds.

If there is an exception thrown in a request that runs for longer than 70 seconds, the actual exception message is not reported, but rather:

request /rewrite.cfm (/var/lib/tomcat8/webapps/ROOT/rewrite.cfm) has run into a timeout (timeout: 70 seconds) and has been stopped. The thread did start 83690ms ago. Open locks at this time (reloadlock403bb92cac7fd71409997ddaf89a50ae).

Suggested fix is to get increment the page's requestTimeout

// Lucee (ms)
local.requestTimeout = (getPageContext().getRequestTimeout() / 1000) + 30;

// ACF (Seconds)
local.requestTimeout = CreateObject("java", "coldfusion.runtime.RequestMonitor").GetRequestTimeout() + 30;

local.requestTimeout = 70;

How to reproduce:

// Your controller/action:

setting requestTimeout = 5;
sleep(4000);
Throw("someError");
set(environment = "production");

// wheels/events/onerror.cfm
local.requestTimeout = 3;

@dbelanger
Copy link
Contributor

dbelanger commented Jul 12, 2021

I just found a problem with this fix on ACF: If the server was setup using the Application Lockdown guide, access to the internal ColdFusion Java components should be disabled.

I think you may have seen this idea from a blog post from Ben Nadel but further down in the comments, Ben mentioned that they simply used a high number (like 10 minutes) for ACF.

It's not a deal breaker but I know that certain sites are not allow to access internal Java components and that's how it showed up for us after I just pushed an update last week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants