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

cfthread of coldfusion on different systems-windows and RedHat

New Here ,
Mar 28, 2013 Mar 28, 2013

Copy link to clipboard

Copied

Recently I use cfthread writing a multithread samples. Each thread ask a http request.When I run this cfc file with coldfusion9 on windows, it runs well. Then I run the same cfc file on coldfusion9 on linux(RedHat and centOS), unfortunately, it seems do not work, I found the multi thread do not run parallely, they run one by one. The both coldfusion configuration files are same, and the web server use the built-in one of coldfusion. Is there anyone meet the same probelm? And is there something wrong with cfthread to run on linux? Really need your help. Many thanks!

Views

603

Translate

Translate

Report

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 ,
Mar 29, 2013 Mar 29, 2013

Copy link to clipboard

Copied

Could we see the code? Then it would be easier to debug it.

Votes

Translate

Translate

Report

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 ,
May 06, 2013 May 06, 2013

Copy link to clipboard

Copied

LATEST

<cfloop index="pageIndex" from="1" to="#num#" step="1">

                        <cfthread name="thr#pageIndex#" threadIndex="#pageIndex#" action="run">

                                        <cftry>

                                            <cfhttp url="#watson_url#"  method="post" charset="utf-8" timeout="26000000" useragent="#CGI.http_user_agent#" result="THREAD.GETTREAD">

                                       <cfhttpparam type="formfield" name="appGUID" value="#guid#">

                                       <cfhttpparam type="formfield" name="userId" value="#user_id#">

                                       <cfhttpparam type="formfield" name="password" value="#user_pass#">

                                       <cfhttpparam type="formfield" name="sql" value="#TempArr[threadIndex]#">

                                          </cfhttp>

                                          <cfset result_Arr = #DeserializeJSON(THREAD.GETTREAD.Filecontent)#>

                                          <cfset resultArr[threadIndex]=result_Arr >

                                         

                                          <cfcatch type="any">

                                  </cfcatch>

                                    </cftry>

                     

                       </cfthread>

     </cfloop>

TempArr is an array for sql,each thread run a sql and get result from http request.

Votes

Translate

Translate

Report

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
Documentation