Not only that, data connection going permanently bye-bye is also an issue. For myself it's also just in case something goes wrong. Can't debug all IB errors.
When running my automated trading system I don't need the GUI which TWS offers. So, for that I don't use TWS but Gateway instead. Gateway doesn't need those regular restarts.
I start Gateway on Sunday evening and let it run until the following Saturday morning. I use it in combination with IBC (IB Controller). I am not seeing any issues due to it disconnecting, but that may also be caused by how I use it.
Ah you have IBC preventing restarts? I'm pretty sure that gateway has a setting where it restarts daily under lock and exit but I'm not at the desk so can't check.
Well, I don't think that if there is a restart that it would be a complete "lock & exit". Because in such a case two factor authentication would be necessary and IBC can not take care of that (I have 2FA enabled). I was looking at what IB themselves have to say about this topic. I came across the following text: Source: http://interactivebrokers.github.io/tws-api/initial_setup.html My computer is using Ubuntu as OS and IB proposed version 9.72 as stable version, both for TWS and Gateway. So that is what I'm using.
OK that's why. For versions earlier than 974(?), IBC avoids the daily restart by changing the time, but it can't do that in later versions. In later versions, the restart does not require authentication except once a week, but I manually authenticate on Sundays anyway.