Jump to content
Sign in to follow this  
Guest mrdavidlaing

Occasional Lightstreamer SYNC error

Recommended Posts

Guest mrdavidlaing

The Excel Addin (using the .NET Lightstreamer client) occasionally looses the streaming connection for prices with the following error:

Read answer: SYNC ERROR
Error in rebinding to the session
Lightstreamer.DotNet.Client.PushServerException: Session not found
at Lightstreamer.DotNet.Client.PushServerTranslator.CheckAnswer(StreamReader answer) in    D:\projects\CIAPI\CIAPI.CS\src\StreamingClient.Lightstreamer\Lightstreamer.dotNetClient_N2\PushServerTranslator.cs:line 412
at Lightstreamer.DotNet.Client.PushServerProxy.ResyncSession() in

The server side logs contain:

26-Jul-11 15:34:54,819 |INFO |LightstreamerLogger.requests |SERVER POOLED THREAD 10 |Sync error: Can't find session from 192.168.179.230:15818

Full details of the error & related logs athttps://github.com/cityindex/CIAPI.CS/issues/53#issuecomment-1661256

Do you have any idea what the cause of this issue is; and how to go about resolving it?

Share this post


Link to post

We usually see this error when the load balancer is sending you’re client to a different Lightstreamer server. The session should be sticky meaning you always go back to the same server. There should only be one Lightstreamer server in the Load balancer pool at the moment because we took the others out untill this issue was resolved. Since then the Flex client hasn’t ever had this error, so it’s interesting that you have now got it. I’m wondering if it’s when you client starts running very slow and using up resources it maybe handshakes to the server less and you’re session on the server has expired. Is there any pattern to when this happens

Share this post


Link to post
Guest andreif

We usually see this error when the load balancer is sending you’re client to a different Lightstreamer server. The session should be sticky meaning you always go back to the same server. There should only be one Lightstreamer server in the Load balancer pool at the moment because we took the others out untill this issue was resolved. Since then the Flex client hasn’t ever had this error, so it’s interesting that you have now got it. I’m wondering if it’s when you client starts running very slow and using up resources it maybe handshakes to the server less and you’re session on the server has expired. Is there any pattern to when this happens

Typically, this error happens when client subscribes to numerous price streams. It (almost) never happens with small number of streams.

Share this post


Link to post

Hi Gain Support,

I get a SYNC ERROR from the server regularly, within 3 - 45 minutes of obtaining the streaming session id.

A request to this url: https://push.cityindex.com/lightstreamer/create_session.txt
with my user name and password and the STREAMINGALL adapter set yields:
- this control address url: https://PUSH2.CITYINDEX.COM/lightstreamer/control.txt
- and the sessionID

I have 4 streams open:
- PRICES (AUD/CAD, AUD/JPY, EUR/AUD, EUR/USD, USD/CAD)
- ORDERS
- TRADEMARGIN
- CLIENTACCOUNTMARGIN

I subscribe to the above streams successfully, so its not a matter of the object ids or schema. As they are initially succeeding, I won't post them here unless you'd like.

I'm using c++ and libcurl.

I try to rebind, but this fails, likely because the session has expired (according to the original post in this thread).

However, with all the quotes I'm getting back every second, I would think that the session should live on.

Or perhaps the content length was reached . If so, that content length seems a bit short. I've not checked into this possibility yet. Would this be a common problem?

Do you know why I get this SYNC ERROR error?


I'll provide any info you need.

Thanks,

Chris

 

Share this post


Link to post

Hi,

We just wanted to check the authentication part when you subscribe to Lightstreamer. Are you passing your account user name and the password as the Session ID received when logging into the REST part of the API?

Kind Regards, PM!

Share this post


Link to post

Hi Physicsman,

In my Lightstreamer connect routine,  I use my account login username and the sessionId as the password, where the sessionId was obtained in the api /session  response.

As rebinding failed due to the sync error, I am now reconnecting by calling the connect routine again, then subscribing to all streams again. This is working in testing. So, finding the answer to this question has reduced importance for me at the present time.

It does remain interesting why the SYNC ERROR would occur.

Thanks,

Chris

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×