I'm seeing some confusing behavior with a workflow that I have executing within another workflow. Here are the details:
Within the primary workflow, I execute in a loop a workflow that performs a specific step on an array of objects.
When I check the logs for the latter workflow, the full run is successful. The response shows the expected data, and there are no errors.
Yet, within the top-level workflow. I get one of the following errors:
{"data":null,"metadata":{},"error":"Internal Error running a block: An internal server error occurred"}
Can't reproduce now, but was previously being told I had a timeout error at 180000 ms for the filterOutIfSpammy step
This was especially strange since I have the timeout for this step set to the maximum of 600000, and in the child workflow, I see that it completed in ~4 minutes.
Note: When I've run the child checker workflow with less values in the input array, the workflow returns the response to the parent workflow without any issues.
I'm stumped at how to troubleshoot this any further, so any help would be much appreciated. Thanks!
Hey @zeke, welcome to the community!! Great to have you here, thanks for reporting this!
It looks like this might be related to payload or VM memory limits.
For further debugging, it would be really helpful if you could share the run ID for a failed workflow run, as well as the run ID for a successful workflow run. With both of those, we can take a closer look at what might be happening on our side. Thanks!
Hey @zeke, we were able to reproduce this error and confirmed that it's the result of a current product limitation. Workflows triggered from within another workflow are hard-coded to time out after 180000ms (3 minutes), regardless of the block settings. There are some underlying reasons for this, but we have an open ticket to fix it and will let you know when that happens.
In the meantime, I can suggest a few different workarounds:
Instead of using the native “workflow calling workflow” block, trigger the child workflow via its REST API endpoint.
Revisit the architecture and see if the child workflows can be structured to "run until finished" independently.