Architect Flow - Script Execution Time Variance

Hey all,

How’s everyone handling FLOW PUBLISH times? We’ve got a really weird variance happening after deployments and it’s killing our CI/CD pipeline. It shouldn’t be this slow.

Basically, we’re automating FLOW PUBLISHES via the API, and some deployments are finishing in under 10 seconds, others are timing out at 60 seconds. The FLOWS themselves aren’t massively complex - a few DISCONNECT blocks, some TRANSFER actions, mostly routing logic to IVRs. Nothing crazy. We’re using the REST API - POST /api/v2/architect/flows/{flowId}/publish.

The POST request itself is pretty quick, it’s the backend process that seems to be the bottleneck. I’m looking at the execution logs within the ARCHITECT interface, and the time between the API call returning and the FLOW actually being ACTIVE varies wildly. The logs show everything happening sequentially - VALIDATE, BUILD, DEPLOY - but the DEPLOY stage is where it hangs.

Off the top of my head, I’m thinking maybe something is getting cached somewhere? Or maybe there’s some sort of internal resource contention going on. It’s hard to tell because the API doesn’t give much detail. I’ve tried adding retries with exponential backoff, but that just masks the problem, doesn’t solve it. The retries eat up even more time.

Here’s a snippet of the Terraform we’re using to trigger the publish:

resource "genesyscloud_architect_flow_publish" "publish_flow" {
 flow_id = genesyscloud_architect_flow.main.id
}

We’re not directly calling the API, but Terraform uses the SDK under the hood. The SDK version is current, as of today - 6.3.0.fwiw.

Here’s what we’ve tried:

  • Verified the FLOWS are valid before publishing - no errors in the ARCHITECT designer.
  • Checked the ORGANIZATION’s overall health in Genesys Cloud - no reported issues.
  • Tried publishing the same FLOW multiple times in a row - results are inconsistent.
  • Increased the timeout on the Terraform resource to 120 seconds, which helps… but it’s still slow.
  • We’ve looked at the SYSTEM_SETTINGS for the ENVIRONMENT. Everything looks standard.
  • Tried publishing from the Architect UI manually - times are more consistent, but still slower than expected - averaging around 15-20 seconds.
  • Checked CPU and memory usage on the Terraform runner - doing jack all, well under capacity.

Environment specs:

  • Genesys Cloud Region: US East
  • Terraform Provider version: 4.14.1
  • SDK version: 6.3.0
  • Flow complexity: Moderate (avg. 10-15 nodes)
  • CI Runner: AWS EC2 (m5.large)

It feels like there’s some underlying process that’s occasionally getting bogged down. What are other folks seeing for FLOW PUBLISH times? Any thoughts on how to troubleshoot this? Is there a way to get more detailed logs on the DEPLOY stage? The overhead of these unpredictable publish times is starting to become a major pain point. We need consistent, fast deployments to keep things moving.

1 Like
{
 "query": {
 "type": "detail",
 "groupBy": [
 "flow.id",
 "flow.name"
 ],
 "metrics": [
 "flow.executionTime"
 ],
 "filter": {
 "type": "and",
 "clauses": [
 {
 "type": "date",
 "field": "flow.startTime",
 "operator": "gte",
 "value": "2024-01-01T00:00:00Z"
 }
 ]
 }
 }
}

I think the publish times are connected to the flow execution time itself. We’ve seen that flows with more complex logic - even if they seem simple - can take longer to process during the publish step. The API doesn’t always show the whole story.

Try looking at the flow execution time metric via analytics. This query should give you a breakdown by flow. I’m not sure the filter is perfect, maybe you need to adjust the dates. The execution time is often a good indicator if something is causing a delay. Also, off the top of my head, it could be related to the number of DISCONNECT blocks. Maybe the system is struggling to process those in parallel? YMMV.

1 Like