Can you correlate the time-stamp for "USER INACTIVE" in the server log to your "connection to server ... lost"?
In a sense it's clear what happens: the client loses the network connection to the server (possibly the server dies), after the server is not back online (or connection not restored) within 5*120 seconds, and at that point ATK gives up.
As for why this happens, there is no real information from the logs or otherwise for me to even guess... Is it possible there is some particular part of the script that takes extremely long to compute?