Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Large Query Timeout ColdFusion 2018

New Here ,
Oct 28, 2022 Oct 28, 2022

My production environment is being moved from Windows 2016 to Centos 7.9. On my Windows deployment, I can run a large query without it timing out. Windows/Centos have the same Memory and CPUs. However, on the CentOS server, the same code (query) times out. I've extended the TimeOut by using sessionTimeout variable, but it still errors out.

 

The ColdFusion Settings are identical for both servers:

  • Timeout = 2400
  • Request Size Limits = 1000
  • Max size of post data = 100

 

Database is accessible directly by both servers.

 

Even if I increase Timeout, Request Size Limits and Max Size of post data settings, on the Linux deployment it times out. The same settings on Windows don't time out.

 

Any ideas? I've had to paginate pages with a lot of data, but some pages I can't paginate. It needs to display all the data pulled from the DB.

771
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 28, 2022 Oct 28, 2022

I guess it's this.

https://tracker.adobe.com/#/view/CF-4205971

Set heartbeat_interval to 0 in worker.properties.

The file is created in the Apache configuration directory (e.g. /etc/httpd/conf/workers.properties). And restart Apache.

Translate
Community Expert ,
Oct 28, 2022 Oct 28, 2022

Eugene, first, do you see an error indicating that the query is timing out? or is the page timing out? That's an important distinction. 

 

And by the "timeout" you're setting to 2400, do you mean "Timeout Requests After"?  To be clear, that affects max request duration, UNLESS your code overrides it to with <cfsetting requesttimeout=... >.

 

Then also, note that on cfquery you may find you have a timeout, which relates to that query only (though it does NOT mean if the query runs that long or will STOP at that point. It will take however long it takes, but the cf request will throw an error when the query does finish.) 

 

Also, note there is no "Request Size Limits" that you say you set to 1000. Can you clarify?

 

Finally, if the query IS taking that long, the problem COULD be that the query is taking that long in the db (and a db monitoring tool could confirm that). But it also may be that the delay is in communication BETWEEN CF and the DB. There are tools that can help spot that (FusionReactor tracks for each query its db time and its network or "result" time.). I'm not sure if the PMT makes that distinction. 

 

There can be any number of explanations for what you're suffering. Someone may propose a specific fix for you, but if not, this is a debugging exercise to find the problem then implement the solution.

 

If you need it solved and even a modest cost for assistance is palatable, I can help remotely. An hour of my time may be a couple time more than an average developer's time, but if I can solve it far faster than they can, it may make sense. More at carehart.org/consulting.

 

Anyway, see my initial questions above. We (collectively) may be able to solve this here. 


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 28, 2022 Oct 28, 2022

Hello Charlie

 

Thanks for the response. For long queries on the Linux server, after a couple of moments, the page will error out with "This page isn't working right now. Server didn't send any data. ERR_EMPTY_REPONSE." On the Windows server, the same page will load.

 

In regards to Timeouts, YES, I'm referring to Timeouts out after. Also, I've also set the variable "sessionTimeout" to a greater number in the URL.

 

Requests Time Limit is in the ColdFusion Settings page along with Max Post Size Data.

 

The Timeout appears to be on the Linux side because I'm using the same exact code on both servers. Only the Linux server times out. Both are in the same vlan and both have direct access to the DB. Both have the same CPUs and Memory. Only the Linux server "times out" when attempt to display the long query.

 

Trying to see if there's something else in the configs I should be looking at to tuning the Linux ColdFusion.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 28, 2022 Oct 28, 2022

Eugene, thanks the error message, but note that does NOT tell you the query is what's running long. Let's prove it. 

 

Create a test page that does nothing, and run it. Even with NOTHING, it may be delayed because of any application.cfc/cfm. You want to make sure that's not where the problem is. THEN (only then) put in JUST the query into that empty page. Is that now slow? Please confirm. 

 

Next, I'm sorry I have to be argumentative but there is no SETTING called "Request Size Limits". Please look at the page. There's a section HEADING of that name, but you said you set this to 1000. Can you please clarify what it is that you set to 1000? It may be useful. 

 

Second, the session timeout will have zero impact on this matter. Zero. If you'll accept that, we can move on. If you doubt it, we can discuss.

 

I know you're focusing on cf being on Linux. Let's hold off on presuming that's the issue. There can be other issues. For example, the two cf boxes are different from each other, right? There may be a networking issue, or a firewall issue, etc. And you've not even clarified if a query that does nothing works.

 

In fact, if you put a db client tool on the Linux box, can THAT reach the db?

 

These are all potentially significant diagnostic data points. Please address every one for us, unless you prefer to instead wait for someone to offer you "the magic bullet" you need. 


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 28, 2022 Oct 28, 2022

I guess it's this.

https://tracker.adobe.com/#/view/CF-4205971

Set heartbeat_interval to 0 in worker.properties.

The file is created in the Apache configuration directory (e.g. /etc/httpd/conf/workers.properties). And restart Apache.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 29, 2022 Oct 29, 2022

MAGIC BULLET!!! Thank you Shige. That was it. Thank you as well Charlie.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2022 Oct 29, 2022
LATEST

Hi @shige. ,

Thanks for sharing that. I have added a comment to your ticket, CF-4205951, appealing to the ColdFusion Team to reopen it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources