IB gateways error -> IB Gateway should be running but is not accepting connections

We are migrating our code from version 1.9.0 to 2.7.0.

We have been testing that for a few days, and we noticed that we randomly get the following error:


system.log.2022-01-14:6048:2022-01-14 09:06:46 UTC| <11>1 2022-01-14T09:06:46Z 338fbdc8b022 quantrocket_flightlog_1 15694 - - 2022-01-14 09:06:45 quantrocket.satellite: ERROR requests.exceptions.HTTPError: ('503 Server Error: SERVICE UNAVAILABLE for url: http://houston/ibgrouter/gateways?wait=True&gateways=ibg1', {'ibg1': {'status': 'error', 'msg': '500 Server Error: INTERNAL SERVER ERROR for url: http://houston/ibg1/gateway?wait=True: b\'{"status": "error", "msg": "IB Gateway should be running but is not accepting connections. Please open the IB Gateway GUI to troubleshoot, see http://qrok.it/h/ibgui for help. IBC log output is below: 2022-01-14 09:00:03:045 IBC: Waiting for config dialog future to complete\\\\n\\\\n2022-01-14 09:00:03:045 IBC: Waiting for config dialog future to complete\\\\n\\\\n2022-01-14 09:00:03:046 IBC: Waiting for config dialog future to complete\\\\n\\\\n2022-01-14

This occurs at a random time during the day, and not necessarily when running processes . Gateways disconnect and stop processing any request.
Gateway GUI just shows an error panel.
We restart the gateways daily as the documentation suggests.
This is something that did not occur with version 1.9.0 with the same gateways with the same credentials. Any idea what could be causing it?

What does the GUI error panel say?

(The ibg service will auto-restart IB Gateway if it is supposed to be running but is unresponsive for 60 seconds. However, this feature only operates if 2FA is disabled.)