I am using the @speckle/objectsender typescript library to send some objects to the server. I have lots of data to send and I have been having issues sending the data.
After a while the server stops responding and returns me a 502 error code. I am wondering if there’s a rate limit I should be aware of?
My use case is that I have approx. 8000 objects, each having a displayValue with approx. 16 meshes, with each mesh having approx. 2000 vertices (estimates, obviously).
I have tried different strategies, batching the send, splitting and detaching but now without ideas. Maybe you can help?
Anyway, this is a problem we’re looking at on and off as much as we can, whenever we get the info. It’s a ghost in the shell thing.
Can you set us up to reproduce it? Eg., it would be rather important we send the same amount of data in the same format as you, and to a local server ideally. Is a minimal viable repo a viable thing to ask for in this case?
Of course here’s my entire code base. Note that right now I am batching (its actually working) but I would love to not have to fix closure tables/merge objects later on.
You mention the above script is actually working. Could you please also send the script that causes the failure?
Could you again run the failing script yourself and let me know the exact time (in UTC time zone) that you received the failure message. Are you given any other information other than the 502 status code? If you can get more details, can you tell me if there a status message or any information in the body of the http response?
This would be very helpful for debugging.
I’ll then add more resources to the server in the hope that this mitigates the problem.
Hi guys, just following up on this. Have you been able to reproduce that? We have been able to send small models, but once we pipe larger models it becomes slow and unreliable.
Hi @vwb - apologies for not providing an update sooner. I’ve taken your script and have been running it against various of our testing servers, but have not yet been able to recreate the exact symptoms.
As @jonathon suggested, please could you try running the same against the following and let us know the outcome (whether it succeeded or failed, and the error message if it failed):
Thanks for the suggestion. I have configured this code sandbox, and submit tasks to all the four servers. PW, Speckle, Speckle Latest, Speckle Latest Dev. Here: Object Sender CodeSandBox
I have made all the projects to be public in all the servers, so hopefully you only have to bring your tokens. To run the tests, please have a look at package.json scripts, OR Codesandbox Tasks if your familiar with that.
I hope that this is useful, and I can’t tell you how much we are looking forward to migrate our data storage to Speckle, but it needs to be able to handle gracefully the amount of data we deal with on our projects.
This is really great evidence @vwb , thank you for running the experiments.
From your evidence and the additional server data we have, it strongly suggests that these errors originate with our firewall provider. We’ve made contact with the vendor to try to resolve this.
In the meantime, we believe a more robust retry mechanism is required in the client. Some HTTP and TCP issues would always be expected in any sequence of large volumes of requests. For example, if we send 20 requests every minute for 1 hour duration, we’d expect a 0.1% error rate in the system to cause at least one request to fail.
The client should be expected to retry after receiving a 500-series status code, and this is something we will focus on.
We’ve made some other changes to the server recently to better improve performance when sending. If you have the time, it would be great if you can retry and report back any issues.