Hi folks.
We’re getting the following timeouts on a Receive() call to app.speckle.systems.
System.Net.Http.HttpRequestException: Response status code does not indicate success: 524 (<none>).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Speckle.Sdk.Transports.ServerUtils.ServerApi.ResponseProgress(HttpResponseMessage childrenHttpResponse, IProgress`1 progress, CbObjectDownloaded onObjectCallback, Boolean isSingle)
at Speckle.Sdk.Transports.ServerUtils.ServerApi.DownloadSingleObject(String streamId, String objectId, IProgress`1 progress)
at Speckle.Sdk.Transports.ServerUtils.ParallelServerApi.RunOperation(ServerApiOperation operation, Object inputValue, ServerApi serialApi)
at Speckle.Sdk.Transports.ServerUtils.ParallelServerApi.ThreadMain()
at Speckle.Sdk.Transports.ServerUtils.ParallelServerApi.DownloadSingleObject(String streamId, String objectId, IProgress`1 progress)
at Speckle.Sdk.Transports.ServerTransport.CopyObjectAndChildren(String id, ITransport targetTransport)
at Speckle.Sdk.Api.Operations.RemoteReceive(String objectId, ITransport remoteTransport, ITransport localTransport)
at Speckle.Sdk.Api.Operations.ReceiveImpl(String objectId, ITransport remoteTransport, ITransport localTransport, IProgress`1 internalProgressAction, CancellationToken cancellationToken)
at Speckle.Sdk.Api.Operations.Receive(String objectId, ITransport remoteTransport, ITransport localTransport, IProgress`1 onProgressAction, CancellationToken cancellationToken)
The 524 response status is the timeout response from Cloudflare. The BATCH_SIZE_GET_OBJECTS is set to 10,000 objects per HTTP request in ServerAPI.cs. It appears that this isn’t returning in time before the Cloudflare 100s timeout threshold.
There currently isn’t a way to change this batch size to something smaller to avoid this. Ideally, the ServerTransportFactory.Create() in the SDK would be changed to allow setting this to a different value. An approach might be to have the constant as MAX_BATCH_SIZE_GET_OBJECTS with another value for a sensible minimum. The Create() function could then allow the setting of batch_size between these values if required.
This is currently a show-stopper for us. If there is a different way of avoiding this problem it would be great to know.
Tim Lewis.