My app makes 4 calls to open ai chat gpt. It normally takes 2-3 minutes to obtain the complete answer of all the calls but now it takes above 5min and ends with the error showcased in the picture above.
I started looking at the server logs and found this:
1)Before it starts to run it passes through a conditional that is this one that works fine.
3)On the second call in this example, in between the initialization of the call and the end of it the conditional workflow starts all over again.(The conditional we saw on step 1).
4)With the third call to chat gpt the same thing happens. In between it starts the conditional workflow again in between the beginning and the end of the call.
Looks like it’s timing out. To confirm this, change all of the calls to gpt-3.5-turbo. If it fixes the issue, then timeout is the problem. Instead of chaining calls in the same API workflow, have multiple API workflows.
API workflows time out (after 5 minutes, I think). If you have three calls that each take 2 minutes, the total is 6 and the workflow will timeout. However, you can have 1 call of two minutes, then schedule a new workflow with another call of 2 minutes etc.