Hey @Brian,
Things have been running very smooth for the last couple months, but suddenly in the last few days my daily Polygon stream job started failing with the following error. Unfortunately it doesn't provide enough information for me to troubleshoot. Can you help?
Here's my cron job:
quantrocket realtime collect 'usstock-realtime-polygon'
Here's the detailed error logs:
quantrocket_flightlog_1|2021-11-24 03:30:02 quantrocket.realtime: INFO Collecting market data for 12130 securities in usstock-realtime-polygon
quantrocket_houston_1|172.18.0.14 - - [24/Nov/2021:08:30:02 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_realtime_1|updating market data collections
quantrocket_houston_1|172.18.0.14 - - [24/Nov/2021:08:30:10 +0000] "GET /master/securities.csv?exclude_delisted=True&fields=Symbol&fields=SecType&fields=Timezone HTTP/1.1" 200 509084 "-" "-"
quantrocket_realtime_1|Issuing market data request for A STK (sid FIBBG000C2V3D6)
quantrocket_blotter_1|recycling spooler after 90 tasks
quantrocket_blotter_1|OOOPS the spooler is no more...trying respawn...
quantrocket_blotter_1|spawned the uWSGI spooler on dir /var/tmp/uwsgi/spool with pid 389
quantrocket_houston_1|172.18.0.8 - - [24/Nov/2021:08:30:13 +0000] "GET /master/securities.csv?vendors=ibkr&fields=ibkr_ConId HTTP/1.1" 200 768677 "-" "-"
quantrocket_realtime_1|An error occurred while subscribing to A STK (sid FIBBG000C2V3D6), retrying (error was: 'NoneType' object has no attribute 'send')
quantrocket_flightlog_1|2021-11-24 03:30:14 quantrocket.realtime: ERROR Traceback (most recent call last):
quantrocket_flightlog_1|2021-11-24 03:30:14 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 25, in wrapped
quantrocket_flightlog_1|2021-11-24 03:30:14 quantrocket.realtime: ERROR File "sym://qrocket_realtime_collect_polygon_streamconn_py", line 134, in subscribe
quantrocket_flightlog_1|2021-11-24 03:30:14 quantrocket.realtime: ERROR AttributeError: 'NoneType' object has no attribute 'send'
quantrocket_flightlog_1|2021-11-24 03:30:14 quantrocket.realtime: ERROR
quantrocket_realtime_1|Polygon status message: {'status': 'auth_success', 'message': 'authenticated'}
quantrocket_realtime_1|connected to: wss://socket.polygon.io/stocks
quantrocket_realtime_1|Worker exception detected, shutting down
quantrocket_flightlog_1|2021-11-24 03:30:45 quantrocket.realtime: INFO Exiting Polygon market data collection due to errors
Oddly enough, restarting the realtime Docker service, and re-running this cron job does get things to work.