IB Gateway Stability and Version Upgrade recommendation from IBKR

Brian, I ran into this problem before but tabled it while working on strategies. I've got stability issues with the IB Gateway. FYI, I run a MAC OS with Apple Silicon chip. When connecting to a "live" account it appears to be much more stable but when connecting to a "paper" account getting a successful connection is inconsistent and when I do get connected it drops regularly. I called IBKR support today and when I told them I'm running the 10.19 version of the IB Gateway their recommendation was to upgrade to a more recent version. I believe I'm dependent on Quantrocket for that and maybe this is planned in the next QR release?

In the meantime, I've pasted below some errors that show up on the logs.

2024-10-15 17:45:33 quantrocket.ibg1: WARNING IB Gateway is running but client can't connect after 60 seconds of trying; restarting IB Gateway...
2024-10-15 17:45:34 quantrocket.ibg1: INFO stopping ibg1
2024-10-15 17:45:38 quantrocket.blotter: WARNING IBKR open orders not received in a timely manner, will try again shortly
2024-10-15 17:45:44 quantrocket.ibg1: WARNING ibg1 didn't stop when asked nicely, so forcing it to stop
2024-10-15 17:45:48 quantrocket.blotter: WARNING IBKR executions not received from ibg1 in a timely manner, will try again shortly
2024-10-15 17:45:54 quantrocket.ibg1: INFO starting ibg1
2024-10-15 17:45:59 quantrocket.blotter: WARNING IBKR positions not received in a timely manner, will try again shortly
2024-10-15 17:46:33 quantrocket.history: WARNING [vix-daily] Waiting to collect vix-daily history because no ibg services are running, please start service(s)
2024-10-15 17:47:46 quantrocket.ibg1: ERROR Traceback (most recent call last):
2024-10-15 17:47:46 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
2024-10-15 17:47:46 quantrocket.ibg1: ERROR     six.raise_from(e, None)
2024-10-15 17:47:46 quantrocket.ibg1: ERROR   File "<string>", line 3, in raise_from
2024-10-15 17:47:47 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/connectionpool.py", line 462, in _make_request
2024-10-15 17:47:47 quantrocket.ibg1: ERROR     httplib_response = conn.getresponse()
2024-10-15 17:47:47 quantrocket.ibg1: ERROR                        ^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:47 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/http/client.py", line 1378, in getresponse
2024-10-15 17:47:47 quantrocket.ibg1: ERROR     response.begin()
2024-10-15 17:47:47 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/http/client.py", line 318, in begin
2024-10-15 17:47:47 quantrocket.ibg1: ERROR     version, status, reason = self._read_status()
2024-10-15 17:47:47 quantrocket.ibg1: ERROR                               ^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:47 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/http/client.py", line 279, in _read_status
2024-10-15 17:47:47 quantrocket.ibg1: ERROR     line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
2024-10-15 17:47:47 quantrocket.ibg1: ERROR                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:47 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/socket.py", line 706, in readinto
2024-10-15 17:47:47 quantrocket.ibg1: ERROR     return self._sock.recv_into(b)
2024-10-15 17:47:47 quantrocket.ibg1: ERROR            ^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:47 quantrocket.ibg1: ERROR TimeoutError: timed out
2024-10-15 17:47:48 quantrocket.ibg1: ERROR 
2024-10-15 17:47:48 quantrocket.ibg1: ERROR During handling of the above exception, another exception occurred:
2024-10-15 17:47:48 quantrocket.ibg1: ERROR 
2024-10-15 17:47:48 quantrocket.ibg1: ERROR Traceback (most recent call last):
2024-10-15 17:47:48 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
2024-10-15 17:47:49 quantrocket.ibg1: ERROR     resp = conn.urlopen(
2024-10-15 17:47:49 quantrocket.ibg1: ERROR            ^^^^^^^^^^^^^
2024-10-15 17:47:49 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
2024-10-15 17:47:49 quantrocket.ibg1: ERROR     retries = retries.increment(
2024-10-15 17:47:49 quantrocket.ibg1: ERROR               ^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:49 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
2024-10-15 17:47:49 quantrocket.ibg1: ERROR     raise six.reraise(type(error), error, _stacktrace)
2024-10-15 17:47:49 quantrocket.ibg1: ERROR           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:49 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/packages/six.py", line 770, in reraise
2024-10-15 17:47:49 quantrocket.ibg1: ERROR     raise value
2024-10-15 17:47:49 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
2024-10-15 17:47:49 quantrocket.ibg1: ERROR     httplib_response = self._make_request(
2024-10-15 17:47:49 quantrocket.ibg1: ERROR                        ^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:49 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/connectionpool.py", line 469, in _make_request
2024-10-15 17:47:49 quantrocket.ibg1: ERROR     self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
2024-10-15 17:47:49 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/urllib3/connectionpool.py", line 358, in _raise_timeout
2024-10-15 17:47:50 quantrocket.ibg1: ERROR     raise ReadTimeoutError(
2024-10-15 17:47:50 quantrocket.ibg1: ERROR urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='houston', port=80): Read timed out. (read timeout=120)
2024-10-15 17:47:50 quantrocket.ibg1: ERROR 
2024-10-15 17:47:50 quantrocket.ibg1: ERROR During handling of the above exception, another exception occurred:
2024-10-15 17:47:50 quantrocket.ibg1: ERROR 
2024-10-15 17:47:51 quantrocket.ibg1: ERROR Traceback (most recent call last):
2024-10-15 17:47:51 quantrocket.ibg1: ERROR   File "sym://qrocket_log_py", line 34, in wrapped
2024-10-15 17:47:51 quantrocket.ibg1: ERROR   File "sym://qrocket_spooler_py", line 120, in spooler_monitor_gateway_connectivity
2024-10-15 17:47:51 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/api.py", line 130, in put
2024-10-15 17:47:51 quantrocket.ibg1: ERROR     return request("put", url, data=data, **kwargs)
2024-10-15 17:47:51 quantrocket.ibg1: ERROR            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:51 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/api.py", line 59, in request
2024-10-15 17:47:51 quantrocket.ibg1: ERROR     return session.request(method=method, url=url, **kwargs)
2024-10-15 17:47:52 quantrocket.ibg1: ERROR            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:52 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
2024-10-15 17:47:52 quantrocket.ibg1: ERROR     resp = self.send(prep, **send_kwargs)
2024-10-15 17:47:52 quantrocket.ibg1: ERROR            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:52 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
2024-10-15 17:47:52 quantrocket.ibg1: ERROR     r = adapter.send(request, **kwargs)
2024-10-15 17:47:52 quantrocket.ibg1: ERROR         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-15 17:47:52 quantrocket.ibg1: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/adapters.py", line 532, in send
2024-10-15 17:47:52 quantrocket.ibg1: ERROR     raise ReadTimeout(e, request=request)
2024-10-15 17:47:52 quantrocket.ibg1: ERROR requests.exceptions.ReadTimeout: HTTPConnectionPool(host='houston', port=80): Read timed out. (read timeout=120)
2024-10-15 17:47:52 quantrocket.ibg1: ERROR 
2024-10-15 17:48:58 quantrocket.ibg1: WARNING ibg1 still not started, will stop and start again
2024-10-15 17:48:58 quantrocket.ibg1: INFO stopping ibg1
2024-10-15 17:49:08 quantrocket.ibg1: WARNING ibg1 didn't stop when asked nicely, so forcing it to stop
2024-10-15 17:49:20 quantrocket.ibg1: INFO starting ibg1

If there is anything that can be done prior to the next Quantrocket release please let me know.

Thanks.

This is likely the result of running IB Gateway on Apple Silicon, although it could also be caused by memory pressure. Unfortunately the only solution until the next release is to run IB Gateway workloads on something other than Apple Silicon.

IBKR support's default advice to almost any issue is to update the version of IB Gateway, but I wouldn't put much stock in that, and that's not the problem here. 10.19 is still the currently supported "stable" version according to the IBKR website and works fine with QuantRocket if you're not on Apple Silicon.