When the realtime collector crashes, is there any sort of recovery process that occurs once it's restarted? For example, say the collector crashes and is out of service for 5 minutes; will it replay/sync back up those missed minutes and then resume realtime collection, or do those missed minutes need to be manually patched somehow?
On this topic, is there a good way to monitor the realtime collector and restart it automatically when it crashes? I've been experiences crashes similar (but not necessarily the same) to below about once a week.
Also, any idea why the specific crash below happened? The collection process has to be manually restarted to get things working again. Any help is appreciated; thanks!
# Realtime Collector Crash Below
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR Traceback (most recent call last):
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - Exception in thread polygon_websocket_worker:
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - Traceback (most recent call last):
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "/opt/conda/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - self.run()
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "/opt/conda/lib/python3.8/threading.py", line 870, in run
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - self._target(*self._args, **self._kwargs)
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_workers_py", line 16, in wrapped
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 206, in run
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "/opt/conda/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - return future.result()
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 25, in wrapped
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 184, in _run_until_no_subscriptions
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 104, in _consume_msg
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 231, in _dispatch
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_market_data_py", line 168, in _market_event_handler
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - File "sym://qrocket_realtime_collect_polygon_tracker_py", line 47, in mark_tick_received
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - AttributeError: 'NoneType' object has no attribute 'security'
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 25, in wrapped
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 3889728f128e quantrocket_realtime_1 80571 - - Worker exception detected, shutting down
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 184, in _run_until_no_subscriptions
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 104, in _consume_msg
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 231, in _dispatch
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_market_data_py", line 168, in _market_event_handler
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_tracker_py", line 47, in mark_tick_received
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR AttributeError: 'NoneType' object has no attribute 'security'
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR Traceback (most recent call last):
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z 00bb8948199a quantrocket_account_1 4554 - - waiting until ECB's next expected 4PM CET update to collect exchange rates
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_workers_py", line 16, in wrapped
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 206, in run
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "/opt/conda/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR return future.result()
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 25, in wrapped
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 184, in _run_until_no_subscriptions
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 104, in _consume_msg
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 231, in _dispatch
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_market_data_py", line 168, in _market_event_handler
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_tracker_py", line 47, in mark_tick_received
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR AttributeError: 'NoneType' object has no attribute 'security'
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: ERROR
2021-07-20 09:36:32 EDT| <14>1 2021-07-20T13:36:32Z 3a4b21e6bb8c quantrocket_houston_1 6700 - - 172.18.0.8 - - [20/Jul/2021:13:36:32 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
2021-07-20 09:36:32 EDT| <11>1 2021-07-20T13:36:32Z d5635dcde2a3 quantrocket_flightlog_1 5693 - - 2021-07-20 09:36:32 quantrocket.realtime: INFO Exiting Polygon market data collection due to errors