Inconsistent performance resulting in timeouts

I noticed that my APIs are behaving fairly slowly and inconsistently. See attached logs.

You will see the services.ORGS.addOrg endpoint varies from 160ms to timing out. (5s+). On a second test I had similarly inconsistent performance. Generally the endpoints seems to complete very slowly also, around 2-3s.

For this test, I have removed a lot of things from the endpoint where it’s almost just a “deepsave” operation.

Any idea what might be causing these inconsistencies?

For another app I have been working on, there are far more complex operations and they run a lot quicker. The only time I would exceed 5s is when the script is waiting for external services to respond.

Hi,

Thank you for reaching out and sharing the details of your issue.

To better diagnose the problem, I suggest adding detailed logs throughout your logic. For instance, you can add logs before and after the Deep Save block and other significant operations. This way, we can identify where the logic might be getting stuck or slowing down.

Additionally, it would be helpful to know if you are using the same data for each of your tests. If possible, please provide details about the data being used so we can better understand any potential factors that might be contributing to the performance inconsistencies.

Please let us know how it goes after adding the logs, and feel free to share any new insights or data that might help us pinpoint the issue.

Best regards,
Stanislaw

Hello Stanislaw,

The performance seems to have stablised again, so it’s possible that it was due to some server load issue external to my app.

However, just in case, I have conducted the tests you suggested and have recorded this loom to see if you can determine anything that I might have caused:

Thank you in advanced.

Bob

Thank you for recording and sharing the video. I’ve watched it and can see that the performance issue is no longer present. While it’s possible that the earlier slowness was due to high load on the cloud server, it’s difficult to confirm this as the definitive cause.

If the issue happens again, the logs you’ve added will be invaluable in helping us identify the root cause more quickly.

Thank you for your cooperation.

Best regards,
Stanislaw