Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2009
    Location
    Colorado Springs
    Posts
    8

    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

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  3. #3
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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.

  4. #4
    Member
    Join Date
    Jul 2009
    Location
    Colorado Springs
    Posts
    8
    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>

  5. #5
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    973
    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

  1. Initial Installation
    By ffiisshh in forum General
    Replies: 1
    Last Post: March 29th, 2012, 10:14 AM
  2. Initial snapshot length
    By patilgkk in forum General
    Replies: 5
    Last Post: August 2nd, 2010, 09:04 AM
  3. Client receive old data after some time.
    By mnenchev in forum General
    Replies: 3
    Last Post: November 25th, 2009, 02:27 PM
  4. speed up initial loading
    By rd2008 in forum General
    Replies: 1
    Last Post: November 20th, 2008, 09:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:04 PM.