-
December 16th, 2010, 10:40 PM
#1
Getting time out on initial subscription request
Hello, we have written a number of Data Adapters and had them working for some time. Our client application is able to connect (thick .Net Client). We are making an initial request (subscription) for a data type that will be processed as in Command mode.
The subscription request required the Data Adapter to go to the Database to fetch a number of data items and to perfrom some calculations before it can return the data to lightstreamer.
From the client we are getting all the data but the log file is showing an error:
<ERROR> Exception caught while subscribing to item xxxx : Timeout while waiting for an answer to request.
Is there a lightstreamer parameter we can use to extend this timeout period?
Subsequent request for this data work fine.
thanks in advance
Peter Hiross
-
December 17th, 2010, 09:17 AM
#2
Hi,
there is not such setting on lightstreamer, anyway, in your adapter, when a subscribe call is received, you can start a new thread (or schedule a task somewhere else) and then return immediately.
In this new thread you will fetch the data and send them to the listener so that it can forward 'em to the clients.
This is our guide line to implement adapters. See http://goo.gl/9Kisdn for further details. Let me know if something is not clear
-
December 17th, 2010, 09:58 AM
#3
I forgot to mention that if your adapter is a .NET adapter, there is a timeout parameter (<param name="timeout">) you can configure on the adapters.xml of the java proxy adapter.
-
December 17th, 2010, 04:38 PM
#4
Yes, we do have .NET Data Adapters. Looking in our Adapters.xml file I do not see any parameter <Param name="timeout"></Param>. Do I need to add it? What is the param's units? Milliseconds? What exactly does this parameter do? i.e., are there any side-effects?
What we have in our Adpaters's file
<data_provider name="xxx">
<adapter_class>com.lightstreamer.adapters.remote.R obustNetworkDataProvider</adapter_class>
<param_name="request_reply_port">xxx</param_name>
<param_name="notify_port">xxx</param_name>
<param_name="connection_recovery_timeout_millis">x xx</param_name>
<param_name="event_recovery">use_snapshot</param_name>
<param_name="name">xxx</param_name>
-
December 20th, 2010, 08:36 AM
#5
You can find the parameter listed, together with a short documentation, in the sample adapters.xml file of the StockListDemo Remote Adapter example in LS distribution package, in
DOCS-SDKs\sdk_adapter_dotnet\examples\Remote_StockListD emo_Adapters\Deployment\Deployment_LS\StockList_so ckets
So, you can add the line; the value is in milliseconds.
The timeout should only account for roundtrip delays in the Proxy Adapter / Remote Adapter communication;
in fact, we suggest that the Subscribe implementation should not be blocking.
The default timeout is 10000. A shorter timeout may cause more slow subscriptions to be refused. A very high timeout has a side effect on memory usage with a large number of subscriptions, which will be fixed only in the next release.
Similar Threads
-
By ffiisshh in forum General
Replies: 1
Last Post: March 29th, 2012, 10:14 AM
-
By patilgkk in forum General
Replies: 5
Last Post: August 2nd, 2010, 09:04 AM
-
By mnenchev in forum General
Replies: 3
Last Post: November 25th, 2009, 02:27 PM
-
By rd2008 in forum General
Replies: 1
Last Post: November 20th, 2008, 09:32 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 09:51 AM.
Bookmarks