Skip navigation
Currently Being Moderated

CFThread getting hung during HTTP call

May 4, 2012 9:42 AM

Hi All,

 

I am using one java library(RETSIQ) to get data from RETS Server which uses HTTP call to get the data.

And I am using ColdFusion thread to get data from different RETS servers simultaneously and write that in separate data files.

 

But, sometimes my CF thread getting hung and I am getting the following Java Stack Strace when I am monitoring that thread:

 

java.net.SocketInputStream.socketRead0(Native Method),java.net.SocketInputStream.read(SocketInputStream.java:129),j ava.io.BufferedInputStream.fill(BufferedInputStream.java:218),java.io. BufferedInputStream.read(BufferedInputStream.java:237),org.apache.comm ons.httpclient.HttpParser.readRawLine(HttpParser.java:77),org.apache.c ommons.httpclient.HttpParser.readLine(HttpParser.java:105),org.apache. commons.httpclient.HttpConnection.readLine(HttpConnection.java:1113),o rg.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodB ase.java:1832),org.apache.commons.httpclient.HttpMethodBase.readRespon se(HttpMethodBase.java:1590),org.apache.commons.httpclient.HttpMethodB ase.execute(HttpMethodBase.java:995),org.apache.commons.httpclient.Htt pMethodDirector.executeWithRetry(HttpMethodDirector.java:395),org.apac he.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirec tor.java:170),org.apache.commons.httpclient.HttpClient.executeMethod(H ttpClient.java:396),com.bigllc.retsiq.client.RETSClient.execute(RETSCl ient.java:536),com.bigllc.retsiq.client.RETSClient.search(RETSClient.j ava:365),com.bigllc.retsiq.simpleclient.RETSUserSession.search(RETSUse rSession.java:901),com.bigllc.retsiq.simpleclient.RETSUserSession.sear ch(RETSUserSession.java:264),com.bigllc.retsiq.simpleclient.RETSUserSe ssion.search(RETSUserSession.java:233),sun.reflect.GeneratedMethodAcce ssor71.invoke(Unknown  Source),sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25),java.lang.reflect.Method.invoke(Method.java:5 97),coldfusion.runtime.StructBean.invoke(StructBean.java:508),coldfusi on.runtime.CfJspPage._invoke(CfJspPage.java:2393),cfRETSConnectionFact ory2ecfc714760613$funcSEARCHRETSSERVERRETSIQ.runFunction(......),

coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472),coldfusion.fil ter.SilentFilter.invoke(SilentFilter.java:47),coldfusion.runtime.UDFMe thod$ReturnTypeFilter.invoke(UDFMethod.java:405),coldfusion.runtime.UD FMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368),coldfusion .filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55),cold fusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321),coldfusion .runtime.UDFMethod.invoke(UDFMethod.java:220),coldfusion.runtime.Templ ateProxy.invoke(TemplateProxy.java:491),coldfusion.runtime.TemplatePro xy.invoke(TemplateProxy.java:337),coldfusion.runtime.CfJspPage._invoke (CfJspPage.java:2360),cfinc_Control_TaskSchedule2ecfm1033346474$func_C FFUNCCFTHREAD_CFINC_CONTROL_TASKSCHEDULE2ECFM10333464741._factor9(),cf inc_Control_TaskSchedule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CONT ROL_TASKSCHEDULE2ECFM10333464741._factor15(....),

cfinc_Control_TaskSchedule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CO NTROL_TASKSCHEDULE2ECFM10333464741._factor16(),cfinc_Control_TaskSched ule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CONTROL_TASKSCHEDULE2ECFM 10333464741.runFunction),

coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472),coldfusion.run time.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368),col dfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:5 5),coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321),col dfusion.runtime.UDFMethod.invoke(UDFMethod.java:220),coldfusion.runtim e.UDFMethod.invokeCFThread(UDFMethod.java:201),coldfusion.thread.Task. invokeFunction(Task.java:274),coldfusion.thread.Task.run(Task.java:140 ),coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201),coldfusion .scheduling.WorkerThread.run(WorkerThread.java:71)

 

 

 

Can any one please tell me what is cause of the issue and what will be the solutions for it.

 

Thanks

 
Replies
  • Currently Being Moderated
    May 5, 2012 7:03 AM   in reply to Upen@Roul

    I haven't got the picture yet. What is the relationship between the Java library and the ColdFusion thread? Are you indeed using one "ColdFusion thread to get data from different RETS servers simultaneously and write that in separate data files."? If so, that just might be too much for one thread to do. The moment I see read-processes hanging at a socket, the usual suspects come to mind, namely, long-running queries.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 3:47 AM   in reply to Upen@Roul

    Could you show us the relevant part of the code? It seems like the hanging is caused by race conditions.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points