I have an application which of course is working locally, but when I deploy it it fails
The issue is that I am requesting an operation via a SSE through
NotifySubscription which results in a call to my Named Receiver handler:
public void RequestData(RequestDataCmd request)
However it is taking approx 60-120 seconds for this handler to process (it collects data from a service then posts a large JSON request to a service stack endpoint for processing).
After 30 seconds this named receiver is aborting with the error: "Remote task did not report back."
I cannot see where to specify the timeouts, this error is definitely coming from the client, not the server, but on
ServerEventsClient I can see nowhere to specify the timeout. I have already modified the Heartbeat and Idle timeout on the server to an excessive degree but this does not change the client timeout.
I would really appreciate some help with this one.
You should try to change
ServiceEventsClient.DefaultIdleTimeoutMs which is set to 30 seconds (value is 30000) by default.
ServiceEventsClient.DefaultIdleTimeoutMs = 600000;
Thanks @xplicit, but I have set these properties on the server with no change to the behavior of the client.
You should set this setting on the client side, not the server. Otherwise client will use default timeout of 30 seconds.
Do you mean these private properties?
static int DefaultHeartbeatMs = 10 * 1000;
static int DefaultIdleTimeoutMs = 30 * 1000;
Right, they are not accessible directly, but you can change them through
ConnectionInfo property of
ServerEventsClient which is populated after client is connected.
client = new ServerEventsClient(url)
OnConnect = async c =>
client.ConnectionInfo.HeartbeatIntervalMs = 1000;
client.ConnectionInfo.IdleTimeoutMs = 600000;