Server connection time over for memory calculations

During the memory calculation, the connection time with the server reaches the maximum of 3 hours and the session stops in the middle of the memory calculation, leaving only the display of the memory calculation, which does not end.

Does anyone have a solution to this problem?