Terminal Session Activity error stops the process

I am automating the host system using Terminal Session.
Terminal Session made a Session at the first connection and keeping using that in whole process.
【Current Behavior】
The error is occurring at Terminal Session Activity.

【Expected Behavior】
Not stopping by the error of Terminal Session Activity.

The error happens about a time in 30 times.

Now I am reducing the error by surrounding the Terminal Session activity with Retry Scope. However I would like to know the way or settings to solve this error.

The error log as below.

【Found error message】
15:09:22.5389 Error {“message”:"System.Exception: Error waiting for connection\r\n at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context

15:22:12.4651 Error {“message”:"System.Exception: There was an error connecting to terminal. Error code: Error\r\n at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context

15:06:18.6710 warn EhllapiWrapper.CallEhllApi(25) returned 8
15:06:29.0467 warn EhllapiWrapper.CallEhllApi(4) returned 4
15:06:29.0978 error EhllBridge.IsReady Wait error : Busy

15:22:07.3901 error EhllBridge.Attach error : Busy
15:22:07.3901 error System.Exception: Error attaching to session
at UiPath.Terminal.Generic.EHLLApi.EhllTerminal.InitializeEhll(ConnectionData connectionData)
15:22:07.4111 error at UiPath.Terminal.Generic.EHLLApi.EhllTerminal.InitializeEhll(ConnectionData connectionData)

hi @persol-rpa

Check the below post

Ashwin S

Hi @AshwinS2

Thank you about your reply.
Sorry, I forgot to inform you.
I already set the pcshll32.dll file. but it’s not working.

Thank you

You have to properly logout the mainframe application, other wise it contains the previous session thats why it is giving error.