Orchestrator process in AS400 keeps failing

Scenario: After one two or sometimes 3 hours the process fails with the message below.

The process writes orchestrator queue items to an AS400 terminal,

Steps to reproduce:

Current Behavior:

Expected Behavior:

Studio/Robot/Orchestrator Version:

Last stable behavior:
Last stable version:
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):

Blanco dossier has thrown an exception

Source: Terminal Session

Message: Process : POT_AS400
Environment : Testing
Robot : Laptop Matthias
Info : “Execution error : System.Exception: There was an error connecting to terminal. Error code: Timeout\r\n at UiPath.Terminal.Activities.TerminalSession.EndExecute(NativeActivityContext context, IAsyncResult result)\r\n at UiPath.Terminal.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)\r\n at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)\r\n at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)”
Start Time : 2017/10/26 13:16:07
End Time : 2017/10/26 15:24:16

I have tried to use a “Try catch” for this error, to close the AS400 terminal and then restart the process but no luck.

We are using the ehll method for connection