CFHTTP: first request fast, after slow

I currently have a lot of problems with CF10 CFHTTP.

First my test script:

<CFSET results = arraynew(1) /> <CFLOOP from="1" to="10" index="idx"> <CFSET timer_start = getTickCount() /> <CFHTTP url="https://www.google.de" method="get" result="test" /> <CFSET arrayappend(results, (getTickCount()-timer_start)/1000 & " s") /> </CFLOOP> <CFDUMP var="#results#" /> 

10 CFHTTP calls per line, the time they receive is transferred to the array; what all.

Results of our CF9 server:

CF9 CFHTTP TEST RESULTS

Results of our CF10 server:

CF10 CFHTTP TEST RESULTS

Results of our CF10 server with a delay of 5 seconds between CFHTTP calls:

CF10 CFHTTP TEST RESULTS WITH DELAY BETWEEN CALLS

I already read on the forum and Shilpi Blog , the reason is that the entropy ends on the Linux server. I checked this with watch --interval=0.1 cat ... while my test script started, but it never fell far below 4k (with rngd already installed).

Does anyone have any other idea that I can try to solve this problem? Using / dev / urandom seems unsafe for me; so it’s not an option (since the CF10 server is a production machine).

Thanks guys!

+7
performance coldfusion entropy coldfusion-10
source share
1 answer

When making a cfhttp call on a coldfusion server, the apache httpclient library tries to create a safe random number. This is an operation that depends on the "entropy" of the system.

In the case of Linux systems (mostly just installed), it is observed that this operation can take a lot of time, because the entropy system is apparently quite low. Therefore, as a result, cfhttp calls will be slow.

Source: http://blogs.coldfusion.com/post.cfm/optimizing-cfhttp-calls-on-linux-systems

Solution: add "-Djava.security.egd=file:/dev/./urandom" to your jvm setup.

In the Adobe forums, you will find another thread with your problem and the same solution, and the following link with additional information about the random number generator: http://forums.adobe.com/thread/1063806

There is no need to use / dev / urandom as this is a safe solution: https://security.stackexchange.com/a/3939

+4
source

All Articles