Why Temporal blob size limit errors stop your workflows
If a workflow or activity fails with a blob or payload size error, the data you are passing has grown past what Temporal accepts in one message. The topic brief names a 2 MB payload limit and a 4 MB gRPC message limit, but confirm both values for your Temporal Server version and SDK before you size anything. Limits and their enforcement can change between releases, and the error often appears only in production, after a list, document or result has accumulated data for weeks or months. Start by identifying which workflow type and which call raised the error, because the fix depends on whether the oversized data is a workflow input, an activity argument, an activity result, a signal or a query response.
Oversized data stops progress because Temporal records inputs, results and signals in the workflow's event history, and the server must accept each event before the workflow can advance. When the rejected item is a result or completion that the worker tries to report, the step cannot be recorded, so the run stalls or keeps retrying instead of moving on. The failure looks like a stuck execution rather than a clear crash, which makes it easy to misread. Large payloads also make history grow faster, so the same oversized value repeated across events pushes a long-running workflow toward history size limits as well.
The fix is usually a design change, not only a configuration change. Raising a client or worker setting does not change what the server stores, and a larger durable record only postpones the problem. The durable approach is to write large data to external storage such as an object store or database, pass a small reference such as an ID, key or URL through Temporal, and have activities read or write the full content. Compression and custom codecs can reduce payload size, but they buy time rather than remove the risk. Teams should open this runbook at the first size error, during design review of any workflow that carries documents, files or growing collections, and before adding payload encryption, which can increase payload size.
Which operations fail when payloads grow
Temporal limits how much data a single payload or gRPC message can carry, and the limit applies at several points in a workflow's life. The cards below cover the operations that move data into Temporal and the growth patterns that push them past those limits. Check each one in your own code before tuning any setting.
Workflow start inputs
Workflow inputs are serialized and sent with the start request, so a large input can fail before the workflow ever runs. The usual cause is passing a full record, a file body, or a list of identifiers that keeps growing with the business object. Check the size of the serialized argument in your client code, and confirm which limit your deployment enforces on the frontend.
Self-hosted deployment docsActivity inputs and results
Activities receive their arguments and return results as payloads, and both pass through the service history. A common failure is an activity that returns a full API response or a large document so that the completion event exceeds the payload limit. Check what each activity returns and whether downstream steps need the whole object or only a reference.
Signal and update payloads
Signals and updates add data to a running workflow, and every one is recorded as an event in its history. Teams that stream batches of records through signals often hit the limit gradually, because each message looks small on its own. Check how many signals a workflow receives, the average size of each, and whether a batch could be sent as a reference to stored data.
Query results
Queries return data from workflow state to the caller without writing history, so a large result fails only at the reply. Growing in-memory collections such as all processed items or full audit trails are the usual cause. Check what each query returns, add pagination or summary fields, and test the query against a workflow that has run for a long time.
Event history growth from many events
A workflow that loops over thousands of items, or that fans out many activities, accumulates events until its history becomes large. The size grows with the number of events and with the size of each payload inside them. Check loop counts, use continue-as-new at planned points, and review whether child workflows could split the work into separate histories.
How a payload travels from client to event history
The walk starts when a client calls the SDK to start or signal a workflow. The data converter serializes the input, and any codec can encrypt or transform it before it leaves the process. The frontend service receives the request, and the history service writes it into event history, where the size check applies. Workers later read the same payload to run activities, so oversized data hurts at every hop, and external storage would sit beside the path with only a reference stored in history.
Payload path from client through the service to workers, with the external storage option.
Fix options from compression to external storage
This table compares five ways to get a Temporal workflow or activity under the payload and message size limits, from sending less data to moving large values out of the event history. Read each row against your own failing operation, and start with the option that removes the data from history rather than the one that only shrinks it.
| Fix | What changes in code | Effect on visibility and debugging | When it fits |
|---|---|---|---|
| Send less data | Pass IDs, keys or summaries instead of full records, and let activities fetch what they need at run time | Event history stays readable, and search attributes can still index the fields you query on | The large value is only needed for a decision or lookup, not as input the workflow must carry |
| Compress through a custom codec | Add a payload codec in the SDK data converter that compresses payloads before they are sent, and decode them on the worker | Payloads in the Web UI and CLI show as encoded bytes unless the codec server is running, which slows incident work | Payloads are large but compressible, such as JSON or text, and the size stays under the limit after compression |
| Store references in external storage | Upload the large value to object storage from an activity, return a reference such as a bucket and key, and read it back in later activities | History holds only small pointers, but the data lives outside Temporal, so retention and deletion must be managed separately | Payloads are large, binary or unbounded, and the data must outlive or be shared beyond a single workflow run |
| Split work across child workflows or activities | Move the large collection into child workflows or per-item activities, each with its own history, and aggregate results | Each child has its own history and is easier to inspect, but parent-child trees are harder to follow in one view | Work can be partitioned into independent units, and no single history must hold every item |
| Change the data model | Redesign the workflow input and state so only identifiers and counters are carried through the run, and use continue-as-new for long loops | Histories stay short and predictable, but existing workflow code and stored history may need migration with versioning | Growth comes from accumulating state over time, not from one oversized input or result |
Which fix fits your situation
A workflow start fails when its input is too large, before any task runs. The limit applies to the whole serialized payload, so one oversized document, dataset or file manifest is enough to reject the start request. Measure the serialized size of the input in a test run before choosing a fix.
- First fix: Upload the content to object storage from the client, then start the workflow with a bucket key, checksum and size.
- Fix to avoid: Passing the content through workflow input and then copying it into every activity argument, which repeats the payload in history.
- Compression: A custom codec can compress text payloads, but it only helps when the data is repetitive and does not remove the need for a reference for large files.
- Access scope: Limit the storage credentials workers hold so they can read only the objects the workflow needs.
- Consistent codecs: Keep codec and encryption settings identical across clients and workers, or decoding fails after the change.
Question to answer first: does workflow code read the content to make decisions, or does it only pass it to activities? If only activities need it, a reference is almost always the right design.
Activity return values are recorded in workflow history, so a large result consumes the payload limit when the activity completes. The failure can appear long after the code change that produced the large output, which makes it harder to trace. Check the size of the largest result your activity can return, not only the typical one.
- First fix: Have the activity write the result to storage and return a small object with an ID, key and summary counts.
- Fix to avoid: Splitting one large result into many activities that each return a slice of the same data, which multiplies events in history without removing the problem.
- Deterministic keys: Build the storage key from the workflow ID and activity ID so a retry overwrites the same object instead of creating duplicates.
- Heartbeats: For long paging activities, heartbeat progress so a retry resumes from the last checkpoint.
- Cleanup: Assign retention and deletion of stored results to a later activity or a storage lifecycle rule, and confirm who owns it.
Question to answer first: does the next step need the whole result, or only a summary, a subset or a pointer to the detail? Most downstream steps need far less than the activity produces.
Long-running workflows that loop, poll or process items accumulate events with each iteration. The size problem here is cumulative: no single payload is large, but history keeps growing until the workflow approaches the documented limits. Count events per iteration in a test environment at expected volumes, since this is the number that predicts the failure.
- First fix: Use continue-as-new and carry forward only the state needed to resume, such as a cursor, counters and open identifiers.
- Fix to avoid: Keeping the full accumulated list in workflow state across iterations, which grows history and state together.
- Chunked processing: Process items in fixed-size batches per run so each run has a bounded event count.
- Child workflows: Move per-item work into child workflows, and count the parent events they add, since each child has its own history.
- External records: Store results in a database or object storage keyed by ID, and keep only IDs and cursors in workflow state.
Question to answer first: how many events does one iteration produce, and which state must survive a continue-as-new? Answer both with measurements from a load test, then set an alert well before the limit.
Signals and updates carry their payloads into workflow history, so a large message can exceed the 4 MB message limit or the 2 MB payload limit. Callers often send documents directly because it is convenient, and the failure shows up only when a sender produces an unusually large message. Identify the largest message each sender can produce before deciding on a fix.
- First fix: Send a reference such as an object key, checksum and size, and let the workflow or an activity fetch the content.
- Fix to avoid: Building workflow state from the full body of each signal, which grows history with every message.
- Update validation: Reject oversized update inputs in the update validator, so they fail in the caller before they are accepted.
- Batching: Group frequent small signals into one message when the sender can tolerate the added latency.
- Gateway and client checks: Enforce size limits in the client or API gateway so the error appears where the sender can fix it.
Question to answer first: who sends the signal or update, how often, and does the workflow need the content or only the fact that something arrived? If the workflow only needs the event, a small notification with a reference is usually enough.
How to diagnose and fix a blob size error
This sequence takes a size-limit failure from its event in history to a tested fix that lets affected workflows continue. Each step ends with a check you can run, so the fix rests on measured payload data and a verified change.
Capture the failing event and operation
The on-call operator opens the affected workflow in the Web UI or runs
temporal workflow showagainst the workflow ID. They note the error text, the event ID where the failure appears, and the operation that sent the data, such as starting a workflow, sending a signal, completing an activity, or returning a workflow result. Record the namespace, workflow type, and run ID alongside them. Check: the error names a size limit, and you can tie it to one event ID and one operation in one run.Measure the payload from a sample
Export the input, signal, or result from the failing event as JSON, then measure its byte size with a command such as
wc -con the saved file. Compare the figure with the 2 MB payload limit and the 4 MB gRPC message limit for this topic. Remember that a single gRPC message can carry several payloads, so a request can exceed the message limit even when each payload is small. Check: you have a byte count for the payload, and you know whether the payload alone or the whole message overflowed.Identify the data that changed
Compare the sample with payloads from earlier, successful runs of the same workflow type to find what grew. Common sources are lists that accumulate in workflow state, activity results that return full records instead of summaries, signals that append data each time, and history carried across long runs. The engineer who owns the workflow code should confirm which field or pattern drives the growth. Check: one field or pattern accounts for most of the bytes in the sample, and the owner agrees with the finding.
Choose the fix for the data pattern
Match the growth pattern to a fix. Compression through a payload codec reduces bytes but does not stop growth. Storing large content in external storage and passing a reference keeps the payload small. Returning summaries from activities, splitting work into child workflows or batches, and using continue-as-new can cap how much data a run holds. Confirm each option with the SDK documentation and your team's codec setup. Check: a written decision names the data source, the chosen fix, and the team that will own the change.
Test the fix in a non-production namespace
Deploy the changed worker to a non-production namespace on the same Temporal Server version as production. Run the failing operation with a payload of the measured size, plus a larger one to see how close the change gets to the limits. Use the same SDK version and codec configuration as production. Check: the workflow completes in the test namespace, and the event sizes in its history sit comfortably below both limits.
Confirm affected workflows continue
Run replay tests against recorded histories that contain the large payload, so you can confirm the new code replays deterministically. Then deploy the fix to production workers and watch the affected workflow IDs. Check:
temporal workflow showon each affected workflow shows progress past the failed event, and no new WorkflowTaskFailed events appear. Record the workflow IDs, the deployed worker version, and the replay results in the change record so the fix can be audited later.
What to confirm before you set a fix in motion
Before you change anything, confirm the current payload and message limits in the Temporal documentation for your server version and your SDK. The 2 MB payload and 4 MB message figures used in this runbook are the values to verify, not assumptions to carry forward. Check whether the limit you are hitting is enforced by the server, by the SDK client, or by a gRPC layer in front of the frontend, because each one has its own setting and its own error text. Then confirm which of those limits apply to your deployment, including any proxy, load balancer or Temporal Cloud namespace settings that sit between your workers and the service.
Next, confirm how your codec and data converter handle compressed payloads. If you add compression, the payload that the server stores and the payload that the limit is checked against may differ, and a custom codec for encryption may change the size again after compression. Verify the order in which your data converter applies compression and encryption, and confirm that every worker and any codec server that decodes these payloads supports the same setup. A mismatch here often produces failures that look like the original size error, so test with a payload near the limit before rolling the change out.
Confirm whether your visibility store can still query the affected workflows after the change. Search attributes and workflow memo fields are stored separately from the payload, so moving data out of the workflow input or result should not break queries, but any field you add or change for tracking must be indexed in your visibility store. Also note that workflows already in history keep their original payloads. A fix to input size, compression or external storage applies only to new executions and to new events, so existing long-running workflows may still carry oversized data and need a planned approach such as continue-as-new or a reset.
Security and operations for externalized payloads
Once payloads move to external storage, the workflow history holds only references, and the object store becomes part of the data path. The cards below cover the controls that keep that store, the codec layer and the Temporal services safe to operate, and the checks that catch new size errors after each release.
Encrypt payloads before they leave the worker
Apply payload encryption in a custom codec on the worker so that the bytes written to the object store are already ciphertext. Temporal's self-hosted security model supports custom codecs and a codec server, which lets the Web UI and CLI decode payloads for authorized users. Check that the codec runs for every payload path, including the external storage reference, and that the codec server requires authentication before anyone can decrypt data.
Security docsRestrict who can read the store
Give workers write access to the external bucket or table and give only the decoding service or named operators read access. Scope credentials to a prefix or namespace so one team cannot read another team's payloads. Confirm that the object store's own access policy, not just application logic, blocks reads from workstations and unrelated services.
Set retention and deletion for referenced objects
A reference in workflow history can outlive the object it points to, or an object can outlive the workflow that needed it. Align the object lifecycle with the workflow retention period so that objects are deleted only after the workflows that reference them have closed and been purged. Test that a reset or replay of an old workflow still finds its payloads before you enable deletion rules.
Audit reads of external payloads
Enable access logging on the object store and record which principal read which key, when, and from where. These logs show who accessed sensitive workflow inputs or results and help during incident review. Confirm the log retention period with your compliance team and check that the logs do not themselves store decrypted payload content.
Keep Temporal services on internal networks
The Temporal deployment docs advise running Temporal services on hosts that are not reachable from the public internet, with access limited to trusted internal networks. Apply this to the frontend, internode and database endpoints, and to the Web UI. Pair network restriction with mTLS between services and an Authorizer, because the default noopAuthorizer allows every API request.
Deployment docsMonitor for new size errors after release
Size errors often appear only when a release adds fields to inputs or results, so watch for them in the first hours after each deployment. Alert on failed workflow tasks and activity failures that mention payload or message size, and compare payload sizes per workflow type before and after the release. Record a size budget for each large payload type so that a new field triggers review before it reaches production.
Questions teams ask before fixing blob size errors
How much effort does fixing Temporal blob size errors take?
The effort depends on how many workflow and activity types pass large payloads and how far the fix has to reach. A narrow change, such as moving one activity's output to external storage, is contained to one code path. A broader change touches every workflow that carries large inputs, the workers that serialize them, and the tests that prove the new path works. The main drivers are the number of affected operations, whether payloads are created by your own code or by a third-party SDK, whether a codec is already in place, and how many production executions are still running on the old contract. Ask any partner for a written scope that lists each affected operation and the fix chosen for it, since that list determines the quote.
Can our in-house team fix Temporal blob size errors without a partner?
Often yes, if your engineers already own the workflow code and can read event history. The work is mostly code design: deciding which data stays in workflow arguments, which moves to storage, and how references are passed between steps. The harder parts are operational: confirming which limit was hit, finding every call site, and changing a live system without breaking executions already in progress. Teams without recent Temporal experience usually benefit from a short review of their design before they start. Check whether your team has someone who has run a Temporal worker and service in production, and whether anyone has tested the change against replay of real histories.
What does a partner need from our side to start?
A partner needs enough access and context to see the failing operations as they run in your environment. Typically that means the Temporal version and deployment model, the persistence and visibility stores in use, the SDK and language of the workers, and representative error messages from logs or the Web UI. It also helps to have sample payload sizes, a list of workflow and activity types, and any existing codec or encryption setup. Access to a non-production namespace for testing is important. Confirm with your security team what data can leave their environment during review, because sample payloads often contain personal or regulated data.
Do existing Temporal workflows have to be reset after the fix?
Not always. Many fixes change how new executions pass data, and running executions can finish on the old path if the code keeps supporting both shapes during a transition. Where a workflow already holds oversized data in its history, a reset may be needed to resume from a point before the failure, but resets are a separate decision with their own risks. Changes to workflow code that alter the command sequence also need versioning or patching so that replay stays deterministic. Plan the rollout so that old and new workers can both handle in-flight executions, and decide per workflow type whether it finishes, is reset or is terminated. Reset choices should be tested before they are applied to many executions.
How does storing large payloads externally affect compliance reviews?
Moving payloads to external storage creates a new data store that auditors and security reviewers will ask about. The review usually focuses on where the data is kept, who can read it, how long it is retained, how it is encrypted at rest and in transit, and how deletion works when a workflow is cleaned up. Your evidence should show that the external store has access controls, logging and retention rules that match the classification of the data. Payload encryption through a codec can also be part of the design. Compliance teams should review the storage design before rollout, because the controls they need to see belong to the storage system as much as to Temporal. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue the assessment outcome.
How do we prevent blob size errors from coming back?
Prevention is mostly about design rules and checks that stop large data from entering workflow history again. Teams usually set a size budget for each operation, pass references instead of full documents, and review new activity inputs and outputs during code review. Monitoring helps too: alert on failed workflow tasks and watch payload sizes in test environments before release. Add automated tests that send realistic but anonymized payloads through the workflow path. Document which types may carry bulk data and who approves exceptions. Confirm with your Temporal version's documentation how limits are reported and enforced, since messages and payloads are limited separately.
Does the fix depend on which Temporal deployment we run?
The core fix is largely the same across self-hosted and managed deployments, because the limits apply to the payloads and messages your code sends. What changes is who operates the storage, how you verify the behavior, and what you can configure. On self-hosted Temporal, your team controls the storage, network path and logging, so the design and its evidence sit inside your own environment. On Temporal Cloud, you should confirm with the vendor which limits and configuration options apply to your plan before choosing a design. Either way, confirm the limit values against the current documentation for your server version rather than relying on older notes.
How DeployOpen works on this
DeployOpen starts by finding which workflows and activities carry oversized payloads, then changes the design in the client's own Temporal environment. Each change is tested against real history sizes, documented, and handed over to the team that runs the service.
How we scope
- Inventory the workflow and activity types that fail with payload or message size errors in your namespaces.
- Measure payload sizes from event history and identify which data should move out of workflow inputs and results.
- Agree the fix options, data-handling rules and encryption requirements in a written, fixed-scope document before work starts.
How we build
- Implement the agreed fixes, such as compression, reference-based payloads or external storage, in your workflow and worker code.
- Test changes in a non-production namespace with histories near the limits, and confirm replay still succeeds for running workflows.
- Review the storage and access controls for any external store, including retention and payload encryption through your codec.
How we hand over
- Document each changed workflow, the reasoning behind it, and the size thresholds your team should monitor going forward.
- Provide a runbook for diagnosing future payload errors, including where to find the failing history and how to read its size.
- Walk your engineers through the changes so they can apply the same pattern to new workflows without DeployOpen involvement.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, covering new workflow designs and Temporal Server upgrades.
- Re-check payload sizes after each release or change in workflow inputs, and flag growing histories before they reach the limits.
- Confirm the support scope, response expectations and upgrade handling in writing as part of the retainer agreement.

