我有一个基于服务结构OWIN的API,它正在调用服务结构actor。 API在返回响应之前等待actor完成工作。有时演员可能需要很长时间才能完成。
Actor的默认超时为5分钟,我尝试使用以下方法增加操作超时:
[assembly: FabricTransportServiceRemotingProvider(MaxMessageSize = 1073741824, OperationTimeoutInSeconds = 600)]
在API和actor中。但它在5分钟后正好抛出超时错误。有没有其他方法可以增加服务结构服务/演员的超时?
下面是我在API端收到的错误:
"This can happen if message is dropped when service is busy or its long running operation and taking more time than configured Operation Timeout."
答案 0 :(得分:0)
如果工作时间比预期的要长,该怎么办?你有没有考虑过这个异步/事件驱动?
例如:
BeginProcessing
,在演员内部安排提醒。返回一个Job-token。GetJobProgress
上公开JobMonitorActor
个终结点。使用Job-token进行关联。