Wesocket Reconnection

Today Around 10:52, I was having websocket connection at 9:10 and recieving data,
around 10:52, 11:19, and Many times in between, I was not recieving data for any of the instrument key out of 40 Subscribed instrument keys, and even my connection is also Not closed..

3 Likes

Again Same issue at 12:22.. This Time I was having two WS connections with 2 Individual Accounts,
One Account was deployed on AWS and Other on Local,
both Scripts didnot recieved any data after 12:22 and Connection was Still Alive..

2 Likes

Same here, our program stopped at 10:52. We have sufficient failure recovery measures, but the connections wasn’t closed to trigger those recovery measures. Re-running works but stops after a few minutes.

2 Likes


13:36

1 Like

infact i have been facing this issue, @upstox pls address this.

I am facing the same issue as well

1 Like

@DINESH_18996918 @THIMANNA_20858496 @SAGAR_2045250 @ASHISH_RAM_1922720
We will escalate this matter to our market data teams for investigation. To assist with their analysis, kindly provide additional information: specifically, whether your connection was established via the v2 or v3 websocket, and if this occurrence was isolated to today or if it occurs regularly.

Thanks!

1 Like


I am using V3, but this V3 Doesnot work: module ā€˜upstox_client’ has no attribute ā€˜MarketDataStreamerV3’ and same for V2

So I use MarketDataSreamer without V3

This Issue of V3 Already escalated on Github: Fix:MarketDataStreamerV3->MarketDataStreamer, V3 is not working,no Mo… by imavi-5 Ā· Pull Request #101 Ā· upstox/upstox-python Ā· GitHub

This issue also happened on Thursday, where the WebSocket connection closed unexpectedly and did not reconnect, even though streamer.auto_reconnect(True, 5, 100) was set to enable auto-reconnect.

1 Like

@DINESH_18996918 please udapte your SDK version to latest version which is 2.15 and you will get the MarketDataStreamerV3 class

1 Like

@Upstox is there any update regarding to this..
Today again there is issue around
9:46, 11:57 and 12:26

There is no Error, its just Script maintains connection but is not Recieving any Data for around 30-40 Seconds

2 Likes

I am using V2 version

@Ketan @DINESH_18996918
I faced the same issue today, the websocket was alive for almost 10mins but received no data within these timeframe.
It happpend between 12:58 to 01:06 PM today. Once the data was back the system was working fine again, but In such cases websocket connection should have been terminated but looks like the websocket kept sending some ping pong frames.

3 Likes

@Ketan @Upstox @Pradeep_Jaiswar

Is there any Update on this,

Today there was the Same Issue.. Even Today is Issue with LTP also
around 11:20 LTP of 25250 CE LTP at Websocket connection was 62 but in charts it never touched 62..

3 Likes

Even i’m facing the same issue, there is no data stream after sometime without any error, i’m using v2 library.

Hi @CE5464 / @DINESH_18996918 / @YELTHIMAR_37057316,

We are checking this and will get back to you with an update soon, thanks.

1 Like

no data recieved since morning. its just connected without any streaming.

1 Like

its working fine now , i kept a thread to watch out for any time the websocket stops emitting the data with gap of 10 sec, and log it this throught the day.

2 Likes

Can You Please share Logs?

1 Like

i can accurately confirm these logs from tomorrow. i have restarted it on test machine again, i see that every time you connect the socket , first attempt always fails , it only starts on second attempt, its stable today after the earlier incident today,

logs look like this [2025-05-28 14:29:14.069229] Attempt: 0
Data received: 2025-05-28 14:29:14
[2025-05-28 14:29:49.135788] No data received for 10 seconds. Restarting socket…

[2025-05-28 14:29:49.198609] Attempt: 1
Data received: 2025-05-28 14:35:07

3 Likes

..LOGS

1|UPSTOX-SERVER | [2025-05-29 05:31:19.933352] No data received for 17 seconds. Restarting socket…
1|UPSTOX-SERVER | [2025-05-29 05:31:20.385510] Attempt: 1
Data started: 2025-05-29 05:31:20
1|UPSTOX-SERVER | [2025-05-29 07:23:55.585507] No data received for 18 seconds. Restarting socket…
1|UPSTOX-SERVER | [2025-05-29 07:23:59.821794] Attempt: 2
Data started: 2025-05-29 07:24:00

Since morning , it has stopped in between during these period…

May 27, 2025 11:01:00 AM (IST) ->(GMT): Tuesday, May 27, 2025 5:31:00 AM
May 27, 2025 12:53:40 PM (IST) → (GMT): Tuesday, May 27, 2025 7:23:40 AM

3 Likes