Jump to content
  • 0

[DEMO] Streaming API : Allowed session count reached (code 7)



Hi everyone !

For a week or two, I can observe a little problem on DEMO with streaming API. When I restart my Application, it closes wisely the API, unregistering everything and closing connection. After that the application restarts, and bam, error 7 "allowed session count reached". On saturday, waiting 60 seconds between stop and start was enough to successfully reconnect to the streaming API, but today (monday, stopped at 17h17 GMT+2), it took 20 minutes to have a successfull restart. 

I think it is server side problem : the session seems to exists... maybe it takes time for the server to successfully close it. I used this API for more than a year and it is the first time I have so much trouble with the streaming API....

Anyone else having similar behaviour on streaming API ?

Thanks !


Link to comment

8 answers to this question

Recommended Posts

  • 0

No update 😐

The only things I tried is to wait and try to restart few minutes later...

Actually, it is like a confirmation of the latency when you disconnect / reconnect...

My solution is to ... wait after disconnecting... and sometimes... it takes some time 😫

Have a good day !


Link to comment
  • 0

Had similar issues and had to stop my developemnt until I figure out what is wrong.

All began when I started doing automated testing of my software and the session will be opened and closed many times, I will reach the session limit after 5 tests or so.

It may be possible to stop closing the session, I think reconnecting will give you the old session and the problem is solved. Otherwise, a bit risky moving to live account if the issue is server side.

Has this been fixed yet?

Link to comment
  • 0

No fix => I had the problem yesterday...

Maybe... you can reconnect to the old session but in this case the REST API will connect with different auth infos...
The major problem to me is that it is not always the same amount of time for delay. Sometimes 20 minutes waiting is not enough, sometimes you can reconnect after 45 seconds...

The best solution to me is to have a REST command to force the closing of the streaming API (Note : unsubscribing to everything and closing listeners do NOT solve the problem). With an explicit REST command (with the correct CST- token) => problem solved. 

... maybe I'am wrong totally on the source of the error, I don't know ...

This problem arrived late july, and I had never seen it for a year or more before that !!!

Link to comment
  • 0

No, I have a mail from the IG team => we are limited to one session at a time !
I tested and it is true, when my program is connected to streamAPI, I can't use the stream companion from IGlabs.
I joined a capture of the answer of the mail from IG team.

So I have :

- Only 1 software running at a time (only one session of streaming API used)
- the software is fully closed before relauching another one  with a minute before the disconnection and a new connection).
- before disconnecting from the stream API, I unsubscribe to everything (epics, account etc)
- I also disconnect from the REST API, after the stream API
- I respect all limitations given by IG on IGlabs site
- I don't use the streamAPI companion (only one time to confirm the 1 session limitation)
- I connect the REST API before reconnecting the streamAPI and I use the token of the new connection (I don't reuse the old one, of the connection which has been cut).
- I never experienced those problem before end july 2019, and the connection / disconnection system was not change for months before that

Considering all of that, I tried to explain the problem with a server side timeout. I think it is the simplier explanation, but not sure of it (of course). Maybe if some can get in touch with the dev team, we will have more clues on this problem...


contacts - Dossiers locaux - Mozilla Thunderbird.jpg

Link to comment
  • 0

I agree that this looks like a server side issue on the IG. I started seeing this behaviour at the end of August.

My java code is unsubscribing and disconnecting from lightstreamer and from my log-files this is successful.

I have put a retry around the lightstreamer openConnection method and wait for 30 secs.

The issue is easily reproducible and I can see successful connections after a couple of attempts with the modified code.

I suggest that IG fixes this rather than assuming users are breaching session limits. In my case I am definitely running one Java jar file that connects on a single thread for the api key I am using.



Link to comment
  • 0

Hi !

I did the same thing => a retry loop of connection if a failure is detected (40sec). It connects successfully after few attemps everytime.

I agree about the fix : it is on IG side, to detect a closed session faster or to provide a REST function that force the shutdown of a user session (in order to reconnect after few seconds).

Link to comment

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
  • image.png

  • Posts

    • As the cryptocurrency space evolves, Bitget keeps bringing up worthwhile initiatives to make crypto trading interesting and easy for its users as well as helping them maximise profit.  Gleaning from the likes of Candybomb to PoolX and the likes, the CEX has been seen to steadily provide these services. The PRE MARKET trade seems to be the newest product on the block right now. It is an over the counter trading platform that specialises in providing a pre-traded marketplace for new coins before official listing.  Simply put, it is a p2p framework of some sort that facilitates trading between buyers and sellers enabling them to acquire coins at optimal price thus enhancing advance liquidity and complete delivery at a mutually agreed upon time.  The interesting thing about the Pre Market is that; it allows the advocates or supporters of newly launched projects to trade through a contract before the token goes mainstream or before being airdropped.  This framework is very good for projects that have very high speculation, speculative traders should check out this product.  Good thing is the Pre trade is already live, you can leverage on it to purchase $MERL before its official listing, you could get to earn massive ROI. Here's the link; https://www.bitget.com/pre-market/MERLUSDT
    • Atomic Wallet is experiencing issues with their staking and rewards, so I would like to transfer my ATOMs to another crypto wallet. I contacted Atomic Wallet Support and they recommended Cosmostation Wallet and gave me instructions on how to do this. I followed the links they sent me, which required me to fill in my seed phrase. My ATOMs transferred to Cosmostation Wallet but were immediately transferred out. I never made that transaction. I contacted Cosmostation Wallet Support and asked them what happened. They informed me that I must have been talking to a scammer posing as support from Atomic Wallet. I contacted Atomic Wallet and they said I wasn't talking to a scammer and those links are legit. I lost my funds because my PC must be infected. Atomic Wallet wouldn't outright scam me would they?  
    • With the recent surge in "Cat Coins," a wave of playfulness and intrigue is sweeping the crypto community. KHAI, a meme token built on the Solana blockchain, is at the forefront of this movement. Fueled by a bullish community sentiment, KHAI has experienced a staggering 15.27% price increase in the past 24 hours, pushing its market cap to a noteworthy 24.4 million dollars. This impressive growth comes on top of a remarkable 94.3% price jump over the past week, significantly outperforming both the global market and other Solana-based cryptocurrencies. Could KHAI be the next big memecoin to reach unprecedented heights? Its recent listing on the Bitget exchange, accompanied by a giveaway event, certainly adds fuel to the fire. However, the question remains: will this newfound attention propel KHAI to even greater heights, or will it succumb to the volatility often associated with memecoins? Only time will tell.
  • Create New...