Clarification of "Transaction size exceeds limit" Workflow Error

Hi, I’m hoping to just get some clarification on the meaning of this error:

{
  "type": "workflowExecutionTerminatedEventAttributes",
  "reason": "Transaction size exceeds limit.",
  "details": {
    "payloads": [
      "transaction size of 5349927 bytes exceeds limit of 4194304 bytes"
    ]
  },
  "identity": "history-service"
}

We’ve been struggling with various activity input/output size limitation errors while building out our first prod workflow lately and this looks like it’s referencing something different since it points to the “history-service” but it’s unclear. Is this just saying that a certain activity’s input/output was too large? Or is this somehow saying that our overall workflow has grown too large in some way?

history has a transaction size limit, in this case think it has to do with buffered events that have to then be delivered to your execution.

would look into increasing dynamic config
system.transactionSizeLimit
(default 4 * 1024 * 1024)

in your case but you should also look at why the size of buffered events keeps growing so large for your use case. could be too many events (signals) being delivered to single execution or you might start a larger number of async activities which have large results that complete at the same time or similar.