Results 1 to 6 of 6

Hybrid View

  1. #1

    Question OnFailure(PushServerException e) event called and the connection is forcibly closed

    Drears,

    We have developed a tool with subscribe to all trades to save it and calculate the intraday data but some thing happend that make the client call the event OnFailure(PushServerException e) and after that the connection is forcibly closed and the e.Source = null and e.Message = "No data from server"

    we subscribe using this code
    const string cells = "TradePrice TradeVolume TradeTime";
    var tableInfo = new SimpleTableInfo(GetStocks(), "COMMAND", cells, true)
    { DataAdapter = "PROXY_MarketBeat" };
    _subKey = Connection.Client.SubscribeTable(tableInfo, this, false);

    the GetStocks() returns string like "ts1 ts2 ts3" have 168 item and we handle the OnUpdate(int itemPos, string itemName, IUpdateInfo update) event

    but befour the OnFailure event called the OnActivityWarning(bool warningOn) event called with warningOn = True

    How to solve this problem?
    What is the best method to do that?
    Thanks.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi New Soft,

    This happens because the client does not receive any data from the server (not even the probe messages) for a period of time too long.

    Sure, you may try to increase the timeout parameters, but I'm not sure this is the best way to solve the problem. Is therefore necessary to understand the causes of this break in the comunication between the server and the client. In general, the most common causes for such behavior are two:
    • network disruptions
    • a momentary pause of the server activities, for example due to a gc major collection



    In any case, the behavior observed should be unrelated with subscribtion mode or other application aspects.

    By analyzing the server logs in an interval of time around the time of an issue occurence you should be able to understand what is actually your scenario and therefore hypothesize possible solutions.

    For example if you find that your is a GC puuses problem a possible solution is to configure the launch script of the Lightstreamer server in order to impose GC pauses shorter.

    Regards,
    Giuseppe

  3. #3
    Drears,

    The Lightstreamer throw 169 exception on the console screen like this

    25.Jun.14 13:04:53,258 <ERROR> Exception caught while subscribing to item 'sy8' Timeout while waiting for an answer to request 37700000146d1aa0e29

    and with the event i have subscribed on the top of the thread

    Sir
    How to solve that problem?
    it occur when we try to subscribe other items it become to slow to get data specify the command data subscription.

    Regards,

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi New Soft,

    The message states that a request forwarded to the Remote Adapter during the process of subscribing an Item, does not receive a reply (by the Remote Adapter) within the timeout defined.

    Please consider that the default value (configured in adapters.xml <param name="timeout">10000</param>) is 10 seconds, so if you have not changed it, the subscribe method may last up to 10 seconds for each Item required otherwise a timeout exception will be raised on the Proxy Adapter side.
    Timed out requests are considered as failed and later answers are ignored, this can lead the clients to looping of retry attempts.

    Please you should check your remote adapter behavior in order to investigate why it takes so long to process subscribe requests. Please note that a subscribe reply should just acknowledge the request, and should not be waiting for data from external sources.

    Finally, if the scenario arises only from momentary burst of requests, you may try to increase the timeout on requests.

    Regards,
    Giuseppe

  5. #5
    Dears,
    How to increase the timeout on requests?
    It will be from the client or server?
    Regards,

  6. #6
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi New Soft,


    I confirm you that the timeout on requests is configured on the server side, in the metadata_provider section of adapters.xml file (under adapters/ folder of your Lightstreamer installation).

    Please note that in the factory file for proxy adapters configuration this parameter is commented.


 

 

Similar Threads

  1. Replies: 5
    Last Post: January 18th, 2016, 11:10 AM
  2. Closing connection when browser windows is closed
    By nishant1000 in forum Client SDKs
    Replies: 1
    Last Post: January 23rd, 2014, 10:18 AM
  3. Replies: 11
    Last Post: January 9th, 2013, 10:27 AM
  4. Underlying connection was closed
    By Cerogil in forum Client SDKs
    Replies: 1
    Last Post: September 21st, 2011, 10:19 AM
  5. Replies: 1
    Last Post: February 23rd, 2009, 12:41 PM

Tags for this Thread

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 08:46 AM.