Intermittent error in Web Portal when searching

In one of our environments we have a problem in Web Portal: sometimes user\product  search fails with error

Your session has expired. Log on again.

Unauthorized

It may happen even if user just logged in. Sometimes log out and log in again helps, sometimes not. IIS restart does not help.

In IIS logs I can see 

2019-05-17 13:40:56.1424 INFO ( WebLog maxfaxyt4vj4laguhbyfqzcu) : Creating form VI_ITShop_ProductSelection FindProduct
2019-05-17 13:41:07.2050 ERROR ( WebLog maxfaxyt4vj4laguhbyfqzcu) : VI.Base.ViException: An exception has occurred while executing the form method Popup0_Popup0_ControlRef1_Container3_ControlRef2_ControlRef1_TableSwitchContainer1_GridBand1_gridLoader_ctl02_GridSearchBox. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> VI.DB.Entities.SessionExpiredException: Your session has expired. Log on again. ---> ServiceStack.WebServiceException: Unauthorized
at ServiceStack.ServiceClientBase.ThrowWebServiceException[TResponse](Exception ex, String requestUri)
at ServiceStack.ServiceClientBase.ThrowResponseTypeException[TResponse](Object request, Exception ex, String requestUri)
at ServiceStack.ServiceClientBase.HandleResponseException[TResponse](Exception ex, Object request, String requestUri, Func`1 createWebRequest, Func`2 getResponse, TResponse& response)
at ServiceStack.ServiceClientBase.Send[TResponse](String httpMethod, String relativeOrAbsoluteUrl, Object request)
at QBM.AppServer.Client.AppServerClient.Post[T](IReturn`1 request)
--- End of inner exception stack trace ---
at QBM.AppServer.Client.AppServerClient.Post[T](IReturn`1 request)
at QBM.AppServer.Client.ServiceAuthenticator.<AuthenticateAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.DB.Entities.SessionFactoryImpl.<>c__DisplayClass16_0.<<OpenAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.DB.Entities.SessionFactoryImpl.<_OpenAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.DB.Entities.SessionFactoryImpl.<OpenAsync>d__16.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at VI.DB.Implementation.Connection.Authenticate(IAuthProps props)
at VI.WebRuntime.ServiceConnection.Authenticate(ConnectData cd, Boolean requireAuth)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at VI.Base.ResetLazy`1.get_Value()
at VI.WebRuntime.ServiceConnection.GetAppServerOrDefaultConnection()
at VI.WebRuntime.Data.SearchHelper..ctor(Nullable`1 isSearchWithPrefix, ISession session)
at VI.WebRuntime.Data.SearchBasedFilter.<LoadAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.WebRuntime.WebControls.GridSearchBox.GridSearchFormMethod.<ExecuteAsync>d__10.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at VI.Base.SyncActions.Do(Func`1 action)
at VI.WebRuntime.Compatibility.SyncExtensions.Execute(IFormMethod formMethod, HttpContextBase context, IFormRenderPart renderPart, CancellationToken ct)
at VI.WebRuntime.FormMethodHandler.ExecuteFormMethod(HttpContextBase context, String renderPartId, IDictionary`2 parameters, String clientId)
--- End of inner exception stack trace ---
at VI.WebRuntime.FormMethodHandler.ExecuteFormMethod(HttpContextBase context, String renderPartId, IDictionary`2 parameters, String clientId) VI.Base.ViException: An exception has occurred while executing the form method Popup0_Popup0_ControlRef1_Container3_ControlRef2_ControlRef1_TableSwitchContainer1_GridBand1_gridLoader_ctl02_GridSearchBox. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> VI.DB.Entities.SessionExpiredException: Your session has expired. Log on again. ---> ServiceStack.WebServiceException: Unauthorized
at ServiceStack.ServiceClientBase.ThrowWebServiceException[TResponse](Exception ex, String requestUri)
at ServiceStack.ServiceClientBase.ThrowResponseTypeException[TResponse](Object request, Exception ex, String requestUri)
at ServiceStack.ServiceClientBase.HandleResponseException[TResponse](Exception ex, Object request, String requestUri, Func`1 createWebRequest, Func`2 getResponse, TResponse& response)
at ServiceStack.ServiceClientBase.Send[TResponse](String httpMethod, String relativeOrAbsoluteUrl, Object request)
at QBM.AppServer.Client.AppServerClient.Post[T](IReturn`1 request)
--- End of inner exception stack trace ---
at QBM.AppServer.Client.AppServerClient.Post[T](IReturn`1 request)
at QBM.AppServer.Client.ServiceAuthenticator.<AuthenticateAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.DB.Entities.SessionFactoryImpl.<>c__DisplayClass16_0.<<OpenAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.DB.Entities.SessionFactoryImpl.<_OpenAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.DB.Entities.SessionFactoryImpl.<OpenAsync>d__16.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at VI.DB.Implementation.Connection.Authenticate(IAuthProps props)
at VI.WebRuntime.ServiceConnection.Authenticate(ConnectData cd, Boolean requireAuth)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at VI.Base.ResetLazy`1.get_Value()
at VI.WebRuntime.ServiceConnection.GetAppServerOrDefaultConnection()
at VI.WebRuntime.Data.SearchHelper..ctor(Nullable`1 isSearchWithPrefix, ISession session)
at VI.WebRuntime.Data.SearchBasedFilter.<LoadAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at VI.WebRuntime.WebControls.GridSearchBox.GridSearchFormMethod.<ExecuteAsync>d__10.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at VI.Base.SyncActions.Do(Func`1 action)
at VI.WebRuntime.Compatibility.SyncExtensions.Execute(IFormMethod formMethod, HttpContextBase context, IFormRenderPart renderPart, CancellationToken ct)
at VI.WebRuntime.FormMethodHandler.ExecuteFormMethod(HttpContextBase context, String renderPartId, IDictionary`2 parameters, String clientId)
--- End of inner exception stack trace ---
at VI.WebRuntime.FormMethodHandler.ExecuteFormMethod(HttpContextBase context, String renderPartId, IDictionary`2 parameters, String clientId) at VI.WebRuntime.FormMethodHandler.ExecuteFormMethod(HttpContextBase context, String renderPartId, IDictionary`2 parameters, String clientId)
2019-05-17 13:42:25.9990 INFO ( WebLog maxfaxyt4vj4laguhbyfqzcu) : Module instance created: VI_Start

We have app server configured for Web portal (and sometimes search works). Web portal references appserver using http:// protocol.

To access Web Portal we are using http:// as well.

We don't have any loadbalancing.

We are using 8.0.2

Regards,

Ivan