Copy link to clipboard
Copied
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),java.io.BufferedInputStream.fill(BufferedInputStream.java:218),java.io.BufferedInputStream.read(BufferedInputStream.java:237),org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77),org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105),org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1113),org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832),org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590),org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995),org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:395),org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170),org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396),com.bigllc.retsiq.client.RETSClient.execute(RETSClient.java:536),com.bigllc.retsiq.client.RETSClient.search(RETSClient.java:365),com.bigllc.retsiq.simpleclient.RETSUserSession.search(RETSUserSession.java:901),com.bigllc.retsiq.simpleclient.RETSUserSession.search(RETSUserSession.java:264),com.bigllc.retsiq.simpleclient.RETSUserSession.search(RETSUserSession.java:233),sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source),sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25),java.lang.reflect.Method.invoke(Method.java:597),coldfusion.runtime.StructBean.invoke(StructBean.java:508),coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2393),cfRETSConnectionFactory2ecfc714760613$funcSEARCHRETSSERVERRETSIQ.runFunction(......),
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472),coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47),coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405),coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368),coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55),coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321),coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220),coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491),coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337),coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360),cfinc_Control_TaskSchedule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CONTROL_TASKSCHEDULE2ECFM10333464741._factor9(),cfinc_Control_TaskSchedule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CONTROL_TASKSCHEDULE2ECFM10333464741._factor15(....),
cfinc_Control_TaskSchedule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CONTROL_TASKSCHEDULE2ECFM10333464741._factor16(),cfinc_Control_TaskSchedule2ecfm1033346474$func_CFFUNCCFTHREAD_CFINC_CONTROL_TASKSCHEDULE2ECFM10333464741.runFunction),
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472),coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368),coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55),coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321),coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220),coldfusion.runtime.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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks for you reply.
- I am using RETSIQ java library to communicate with RETS Server.
- In our application there is more than 50 MLS servers are there. So, during downloading that data from different server we create a separate coldfusion thread and then we read data from the server and write that to a text file.
- We have limited our thread creation to some limit. So that when the limit is reached no CF thread will be created further.
My Problem is:
- Sometimes the ColdFusion thread is hanging at the time of data transfer and thread will be live till you kill the thread manually by CF admin API.
I want to know : Is there any way to avoid the thread hanging ???
Thanks
Copy link to clipboard
Copied
Could you show us the relevant part of the code? It seems like the hanging is caused by race conditions.