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

CFHTTP

Community Beginner ,
Apr 24, 2006 Apr 24, 2006
Okay I will describe our problem.

We are running CF 6.1 and IIS 6 on server 2003.

We have a service that people post to and get a response. In the script we have a CFHTTP call to a remote URL. If the CFHTTP takes longer than 18 seconds which can happen IIS seems to lose site of the CFHTTP. The web browser does nothing. It literally just sits there.

So what we have been doing is setting the timeout value on the CFHTTP to 17 seconds to prevent this hang.

We thought maybe it was a CF problem so to rule it out we wrote an ISAPI filter that has nothing to do with cold fusion where you can pass in the time to sleep.

Here is the URL to the script that calls the dll. Pass in time is in miliseconds so 18 seconds will be 18000. Try it for 18000 then 19000 and you will see the effect.

http://mercury.velocitygroup.co.uk/sleepTestPost2.htm

So as it is calling a dll cold fusion does not appear to be the problem

We cannot work out where this arbitrary 18 seconds is coming from. We need our CFHTTP to last for 31 seconds. Does anyone know where this 18 seconds is coming from and how to change it.
1.2K
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

Community Beginner , Apr 25, 2006 Apr 25, 2006
Thanks all we have worked out what the problem is.

Our office broadband box firewall closes connection at 18 seconds. So in actual fact there had never been a problem on the production system. So we had invented a solution to problem that never existed. It just appeared to exist. No magical setting missing.

This one was driving us crazy and it was only random luck we picked up on it.

Thanks all for your help and input.

Thread Closed
Translate
Community Expert ,
Apr 24, 2006 Apr 24, 2006
First, if you're using the IIS server exclusively for ColdFusion, then it is advisable to disable all other Web Service Extensions in the IIS Manager, with the exception of Macromedia Server Extensions. Second, have you verified that the value of the default timeout value for scripts in IIS isn't too low? To find the setting, open the IIS snap-in, right-click on the website, and follow Home Directory => Configuration => Options.

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 Beginner ,
Apr 24, 2006 Apr 24, 2006
i think I am being a bit slow.

I opened up the snap in for IIS. Right clicked on the website in question. Selected properties -> Home Directory -> Configuration -> Options and this is what I have set

Application configuration

Enable session state - Checked and set to 20 min
Enable buffering checked

ASP script timeout - > Set to 90 seconds.

There is no option to configure other script timeouts. as far as i can tell

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 ,
Apr 24, 2006 Apr 24, 2006
Have you verified that there is no variable named URL.RequestTime, set, for example, in a cfparam tag? And also that the timeout value in the Coldfusion Administrator is high enough?

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 Beginner ,
Apr 24, 2006 Apr 24, 2006
There is no paramater set. And the Timeout in CF Admin is set to 120 seconds which is more than enough.

We thought perhaps it was the fire wall but that is not the case.

The funny thing is that when we test it on the dev machines in the office there is no timeout problem. The dev machines are exact copies of the production machines.

There has got ot be a setting somewhere that we are missing.
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
Participant ,
Apr 24, 2006 Apr 24, 2006
Looks like it went off-line now... Before then I was able to enter any time-out up to 60 sec and it worked fine. No "magic" 18 seconds limit.

When you say "we wrote filter" you mean "flter" or "extension"?

Script timeouts in IIS all relate to ASP and have nothing to do with other extensions. The only time-sensitive procedure that may result in request timeout by IIS is a request data reading (TCP socket cannot wait more than 45 seconds), which doesn't look like your case. So, based on the data given, I would assume that this happens on the firewall, if you have one. Do you have this error, if you make the request from behind the firewall?

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 Beginner ,
Apr 24, 2006 Apr 24, 2006
We thought firewall as well. We took it offline and now have managed to knock the entire machine down. Just waiting for datacenter guys to reboot it.

We think however that we have isolated the problem. We ran the test on an internal IP address and we did not get the 18 seconds either. We then ran it internally from one machine to another and still no hanging pages. We then ran it from one gateway location to another and all good. We have two office broadband connections and one of them has always been dodgy as in it flickers connection quite alot. We now think it is this office connection that is causing the problem.

Ill post here when the server comes back up. If anyone reading this can run the test above and post your results here that would help.

Thanks all - very tricky problem
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 ,
Apr 25, 2006 Apr 25, 2006
Beware of ISAPI extensions. Assuming you intend to use the IIS server exclusively for ColdFusion, it is the recommended practice to disable all other Web Service Extensions in the IIS Manager, with the exception of Macromedia Server Extensions.

I agree with Mr Black's point about script timeouts relating only to ASP files. However, ISAPI-induced timeout effects are usually not that straightforward. As far as IIS is concerned, ColdFusion's functionality is on a par with that of the next ISAPI application. IIS forwards CFM, CFC, CFR, etc. requests to the appropriate Coldfusion DLL for processing. The server DLL sends the result back to IIS, which in turn sends it to the client as the response to the client's request. Any ISAPI filter that can disrupt the global timeout settings of the IIS server can therefore affect the performance of CFM pages, albeit indirectly.


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 Beginner ,
Apr 25, 2006 Apr 25, 2006
LATEST
Thanks all we have worked out what the problem is.

Our office broadband box firewall closes connection at 18 seconds. So in actual fact there had never been a problem on the production system. So we had invented a solution to problem that never existed. It just appeared to exist. No magical setting missing.

This one was driving us crazy and it was only random luck we picked up on it.

Thanks all for your help and input.

Thread Closed
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