Websocket data gone at 12PM

The market data websockets stopped sending any data at 12PM for around 6minutes.
Can the team tell what went wrong exactly? (So that it doesn’t occur in future again)

yes experienced same…data is getting stopped again and again frequently

@Hardik @PravinJ @Dhan can anybody from Dhan api team please chime in?

Hello @tradernoob

We do monitor logs at our end and even have alert mechanism in place to ensure that the systems are up and running. Let me double-check in this timeframe and get back to you.

AGAIN TODAY WEBSOCKET IS getting connected and disconnected within second since 15 minutes

1 Like

@Hardik please look into this. Feed has been disconnected more than 50 times today itself. Kindly check.

Hello @svadukia @tradernoob

Checking this

2025-02-20 10:48:21,298 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:48:21,302 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:48:21,309 - INFO - Restarting program in 5 seconds…

2025-02-20 10:48:33,092 - INFO - Market data feed initialized successfully

2025-02-20 10:48:33,119 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:48:38,329 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:48:41,291 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:48:41,293 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:48:41,295 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:48:41,296 - INFO - Restarting program in 5 seconds…

2025-02-20 10:48:53,161 - INFO - Market data feed initialized successfully

2025-02-20 10:48:53,177 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:48:58,321 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:49:35,828 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:49:35,830 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:49:35,832 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:49:35,832 - INFO - Restarting program in 5 seconds…

2025-02-20 10:49:48,038 - INFO - Market data feed initialized successfully

2025-02-20 10:49:48,053 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:49:53,314 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:50:43,365 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:50:43,366 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:50:43,368 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:50:43,368 - INFO - Restarting program in 5 seconds…

2025-02-20 10:50:54,908 - INFO - Market data feed initialized successfully

2025-02-20 10:50:54,923 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:51:00,346 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:52:26,489 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:52:26,490 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:52:26,492 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:52:26,492 - INFO - Restarting program in 5 seconds…

2025-02-20 10:52:40,064 - INFO - Market data feed initialized successfully

2025-02-20 10:52:40,079 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:52:45,323 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:53:36,168 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:53:36,170 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:53:36,172 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:53:36,172 - INFO - Restarting program in 5 seconds…

2025-02-20 10:53:47,641 - INFO - Market data feed initialized successfully

2025-02-20 10:53:47,659 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:53:52,824 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:54:21,490 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:54:21,492 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:54:21,493 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:54:21,494 - INFO - Restarting program in 5 seconds…

2025-02-20 10:54:37,095 - ERROR - Failed to initialize feed: did not receive a valid HTTP response

2025-02-20 10:54:37,096 - ERROR - Program crashed: local variable ‘monitor_task’ referenced before assignment

2025-02-20 10:54:37,097 - INFO - Restarting program in 5 seconds…

2025-02-20 10:54:47,757 - INFO - Market data feed initialized successfully

2025-02-20 10:54:47,772 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:54:50,476 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:54:50,480 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:54:50,482 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:54:50,482 - INFO - Restarting program in 5 seconds…

2025-02-20 10:55:01,108 - INFO - Market data feed initialized successfully

2025-02-20 10:55:01,136 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:55:05,506 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:55:05,508 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:55:05,510 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:55:05,511 - INFO - Restarting program in 5 seconds…

2025-02-20 10:55:17,452 - INFO - Market data feed initialized successfully

2025-02-20 10:55:17,466 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:55:22,831 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:56:12,536 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:56:12,539 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:56:12,542 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:56:12,544 - INFO - Restarting program in 5 seconds…

2025-02-20 10:56:24,549 - INFO - Market data feed initialized successfully

2025-02-20 10:56:24,582 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:56:29,827 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:57:09,050 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:57:09,051 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:57:09,053 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:57:09,054 - INFO - Restarting program in 5 seconds…

2025-02-20 10:57:22,884 - INFO - Market data feed initialized successfully

2025-02-20 10:57:22,899 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:57:28,329 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:58:02,289 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:58:02,292 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:58:02,295 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:58:02,296 - INFO - Restarting program in 5 seconds…

2025-02-20 10:58:13,787 - INFO - Market data feed initialized successfully

2025-02-20 10:58:13,804 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:58:18,832 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:58:54,690 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:58:54,693 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:58:54,697 - INFO - Restarting program in 5 seconds…

2025-02-20 10:59:05,695 - INFO - Market data feed initialized successfully

2025-02-20 10:59:05,711 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:59:10,834 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:59:15,735 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 10:59:15,738 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 10:59:15,740 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 10:59:15,741 - INFO - Restarting program in 5 seconds…

2025-02-20 10:59:26,699 - INFO - Market data feed initialized successfully

2025-02-20 10:59:26,714 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:59:31,818 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 10:59:50,192 - INFO - Market data feed initialized successfully

2025-02-20 10:59:50,205 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 10:59:55,334 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:00:19,784 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:00:19,788 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:00:19,792 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:00:19,794 - INFO - Restarting program in 5 seconds…

2025-02-20 11:00:30,467 - INFO - Market data feed initialized successfully

2025-02-20 11:00:30,500 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:00:35,830 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:01:27,833 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:01:27,835 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:01:27,836 - ERROR - Task was destroyed but it is pending!

2025-02-20 11:01:27,837 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:01:27,837 - INFO - Restarting program in 5 seconds…

2025-02-20 11:01:38,753 - INFO - Market data feed initialized successfully

2025-02-20 11:01:38,771 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:01:38,798 - WARNING - Could not get both ATM option prices, using spot price

2025-02-20 11:01:43,839 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:02:12,825 - INFO - Market data feed initialized successfully

2025-02-20 11:02:12,839 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:02:18,328 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:02:46,323 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:02:46,324 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:02:46,325 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:02:46,326 - INFO - Restarting program in 5 seconds…

2025-02-20 11:02:57,521 - INFO - Market data feed initialized successfully

2025-02-20 11:02:57,536 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:03:02,813 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:04:46,917 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:04:46,921 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:04:46,923 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:04:46,924 - INFO - Restarting program in 5 seconds…

2025-02-20 11:04:58,374 - INFO - Market data feed initialized successfully

2025-02-20 11:04:58,389 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:05:03,810 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:05:56,484 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:05:56,487 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:05:56,490 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:05:56,491 - INFO - Restarting program in 5 seconds…

2025-02-20 11:06:07,069 - INFO - Market data feed initialized successfully

2025-02-20 11:06:07,084 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:06:12,337 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:06:55,987 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:06:55,989 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:06:55,991 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:06:55,992 - INFO - Restarting program in 5 seconds…

2025-02-20 11:07:11,542 - ERROR - Failed to initialize feed: did not receive a valid HTTP response

2025-02-20 11:07:11,544 - ERROR - Program crashed: local variable ‘monitor_task’ referenced before assignment

2025-02-20 11:07:11,545 - INFO - Restarting program in 5 seconds…

2025-02-20 11:07:27,621 - ERROR - Failed to initialize feed: did not receive a valid HTTP response

2025-02-20 11:07:27,622 - ERROR - Program crashed: local variable ‘monitor_task’ referenced before assignment

2025-02-20 11:07:27,622 - INFO - Restarting program in 5 seconds…

2025-02-20 11:07:38,449 - INFO - Market data feed initialized successfully

2025-02-20 11:07:38,485 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:07:43,825 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:10:07,085 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:10:07,088 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:10:07,091 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:10:07,092 - INFO - Restarting program in 5 seconds…

2025-02-20 11:10:18,284 - INFO - Market data feed initialized successfully

2025-02-20 11:10:18,301 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:10:32,046 - INFO - Market data feed initialized successfully

2025-02-20 11:10:32,061 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:10:37,322 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:11:02,688 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:11:02,690 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:11:02,693 - INFO - Restarting program in 5 seconds…

2025-02-20 11:11:13,579 - INFO - Market data feed initialized successfully

2025-02-20 11:11:13,607 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:11:18,817 - INFO - Subscription request sent successfully for 40 instruments

2025-02-20 11:19:17,053 - ERROR - Error in main loop: no close frame received or sent

2025-02-20 11:19:17,054 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-20 11:19:17,055 - ERROR - Program crashed: ‘RealtimeOptionsDataCollector’ object has no attribute ‘_handle_reconnection’

2025-02-20 11:19:17,056 - INFO - Restarting program in 5 seconds…

2025-02-20 11:19:27,867 - INFO - Market data feed initialized successfully

2025-02-20 11:19:27,904 - INFO - Subscription request sent successfully for 2 instruments

2025-02-20 11:19:33,330 - INFO - Subscription request sent successfully for 40 instruments

@tradernoob problem solved in letter half right ??

Hello @svadukia @tradernoob

Yes, there was an issue due to which there was intermittent disconnection. We have deployed fix for the same. Furthermore, we are optimising our backend which will eliminate such instances moving forward.

1 Like

Please let know if you encounter this today @tradernoob @svadukia - we are monitoring.

1 Like

2025-02-21 10:12:17,876 - INFO - Subscription request sent successfully for 2 instruments
2025-02-21 10:58:55,745 - ERROR - Error in main loop: no close frame received or sent

2025-02-21 10:58:55,750 - ERROR - Error during cleanup disconnect: no close frame received or sent

2025-02-21 10:58:55,763 - INFO - Restarting program in 5 seconds…

happened once just now just informing …connected easily again so no worries but happened.

even this was not happening earlier

Faced 3 disconnections between 10:30 and 11

Checking this now

We are looking into the random disconnections. However, it should work with reconnection logic. Will update you with RCA on this soon.

1 Like

today is getting disconnected and connected so much… Is it going to be normal this way ? if yes then should stop using dhan api

Hey, @Hardik
Any update on this? Today there were quite a lot of disconnections yet again.

Hello @tradernoob @svadukia

It would be better if we can connect over call to look into the specifics of it, as on server end, we haven’t seen disconnections today or in the past week.

You can send logs from your end to api@dhan.co and will take a look on priority.