IB Gateway solution?

hi there,
Is there any update or solution to keep using Gateway under 8.1?
For TWS, any idea how to keep the API running even TWS is being locked due to inactivity?
thanks in advance!