Query timeout not adhered to properly when iterated

I have a javascript query which iterates over a list and executes a rest api call. I find that the api calls will 'timeout' based on when all of the api calls finish, not a single one.

For instance, in the screenshot, if submitExpertJob has a timeout of 1000 ms, then when this loop is called, all calls to submitExpertJob will timeout after 1000 ms. It does not seem to be treating each call individually. To get around this, I have set the timeout of submitExpertJob to 120000 - however this will not work at scale. I have a list of 300+ objects which need to be iterated over for an api call, and I would like the timeout to be treated separately for each individual call.

Screen Shot 2022-05-23 at 1.36.29 PM

Hey @ereid7!

I don't seem to be able to reproduce this exact behavior, when I loop over a query I'm seeing the query run time match the total time for the loop but all queries are returning successfully.

Can you try checking the network tab of your browser console to see what the individual runtimes of those queries are so that we can make sure they individually execute within their timeout? Is the batch size small enough at the moment to reasonably do that?