[Resolved] Live Market Feed Websocket keepalive error

Hi,

First of, thanks to the Dhan dev team for releasing the 5000 instruments websocket update.
The websocket code works fine for me for a about a minute (streams live data), but after that I get the following message:
sent 1011 (internal error) keepalive ping timeout; no close frame received

For reference, I am subscribed to about 2200 instruments on this connection and the following is my data fetching loop:

Can you please help me understand what the issue is and how I can troubleshoot? I have already emailed this to the support email. Thanks!

Hello @vyomthakkar

This shouldn’t be occurring now, we added some fixes. Can you check once and confirm?

Hey @Hardik,

No I am still facing the issue.

Can you please fix this once and for all and provide a rough timeline for when this will be done. This is because we are paying monthly subscription amount for apis/websockets that are not working correctly. Thanks for understanding.

Screenshot 2024-09-24 at 12.10.34 PM

i see this issue in multiple threads , but sadly no solution.

@Hardik pls suggest !!!

Hello @virender_singh

This issue has been long fixed, not updated on all threads since multiple threads were created.

@Hardik what was the fix. i faced this issue yesterday only. i am using V2 and latest dhanhq APIs. please provide the steps how to fix it??

@Hardik I see you are claiming back in December 2024 tha the issue has been long fixed but as of April 12, 2025 the 1011 error issue and my ticket is still open. Moreover, till now I am facing the same issue. So, what kind of fixed you are claiming. Please enlighten all of us. And your API documentation is so poor. Please make it easy to use for all of us. No use cases for large number of security_id and whenever one trying to use, facing the deadly 1011 internal error.

Hello @Subinoy_Biswas

Request you to share details on help@dhan.co, as we have not seen such occurences on server end for quite a while. Do note that 1011 can also happen due to any reason of disconnection on network layer itself, if websocket is not appropriately handled.