Results 1 to 6 of 6

Hybrid View

  1. #1
    Member
    Join Date
    May 2010
    Location
    London
    Posts
    18
    Some more information re the two different errors...

    The sequence of events seems to be:
    1. Data\Metadata adapter service restarts
    2. RobustNetworkedMetadataProvider fails, recovers, and requests a snapshot of data from adapter
    3. My adapter takes ca.10sec to start up as it loads a lot of historic data, so in the meantime LS Server is trying to request data for items that my adapter knows nothing about yet, and throws "Generic Exception" errors

    Then, any time after this happens, if a client subscribes to items via the webpage, the "Unexpected updates for item..." is logged and a full snapshot is not sent (in the LS log file I can see a new session being attached and controlled), but updates do come through.

    If I then refresh the page a full snapshot is sent as expected.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    If your Remote Data Adapter takes some time to initialize and, during this time, it is unresponsive to subscription requests,
    then it is probably better making it unavailable for that time.
    You can either postpone the opening of the sockets or block the processing of the init method until the initialization has finished.

    Note that the response to the Subscribe call is supposed to be fast and a timeout of exactly 10 seconds is applied by the Proxy Adapter. If the timeout expires, the Proxy discards the request and subsequent related updates are also discarded.
    This can explain the "Unexpected update" errors.
    The "Object reference not set" errors, on the other hand, seem to be internal to your Data Adapter implementation.

    So, alternatively, you could enlarge the timeout (configured in adapters.xml) or, preferably, have Subscribe answer immediately, regardless of the data availability. In fact, if you don't send the snapshot immediately after returning from Subscribe, this is not a problem from Lightstreamer point of view, provided that the client can accept that.

  3. #3
    Member
    Join Date
    May 2010
    Location
    London
    Posts
    18
    I have found the issue.

    You are correct Dario, in that the "Object reference not set" errors were internal to my Data Adapter implementation, and this was the root cause of everything else.

    In my Subscribe method, I am calling a custom class's public method to do the sending of the updates. I am instantiating this class on a separate thread in my Init method.

    However, in the Subscribe method this class was sometimes null, because in the ca.18ms it took to start the thread and initialise the class, the subscribe method had already been called.

    Thanks for your help with this, these forums are excellent.

    Colm

 

 

Similar Threads

  1. Subscribing to multiple items
    By ablock in forum Client SDKs
    Replies: 1
    Last Post: May 2nd, 2012, 12:56 PM
  2. Subscribing to the Table
    By AidasOzelis in forum Client SDKs
    Replies: 13
    Last Post: June 3rd, 2010, 01:13 PM
  3. having problem while subscribing pairs
    By rekhender in forum Adapter SDKs
    Replies: 1
    Last Post: October 31st, 2008, 09:58 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 01:38 AM.