Error in Edit table after production line takes too long

Dear OD experts,

I’m currently working on an app, where we have an editable data table. The corresponding saveToFunction triggers a production line, which calculates and updates some of the shown data.
However, our production line is (unfortunately) quite slow and thus takes several minutes. After some time therefore an error message appears stating that the save process was unsuccessful. The production line however does not fail, but simply takes a few more minutes and then finishes successfully.
Now to my question, is there some way to prevent this error from appearing by increasing a timeout constant or adjusting the triggering of the production line in the function?
Thank you very much,

Hi @JBreitling :slight_smile:

it depends a bit on where the error message is coming from.

There is a timeframe in which the app waits for responses from functions or other resources. If that is too short, then it will result in a socket-timeout I think. This time-frame can be adjusted for the entire instance by the DevOps.

The other timeframe that might play a role here is how long the function waits for a response from the Production Line. This time you can define directly in the function, you need to hand
over the parameter “timeout” in seconds either to

  • the od-api object directly (it is then applied to all api-calls)
    od_api = OneDataApi(<your usual parameters>, timeout=60)
  • the api-call itself (only possible with the latest SDK release (1.1.0))

If you don’t need/want to wait for the result of the Production Line in the function anyway, you could also just make the API call “asynchronous” which will just trigger the Production Line but not wait for the result but instead proceed with the rest of the function code.

I hope this helps!