# Codec for handling large payloads encounters a script execution timeout after 5000ms

**URL:** <https://community.temporal.io/t/codec-for-handling-large-payloads-encounters-a-script-execution-timeout-after-5000ms/12126>\
**Category:** Community Support\
**Tags:** typescript-sdk, postgresql\
**Created:** [May 15, 2024, 3:34pm UTC](https://community.temporal.io/t/codec-for-handling-large-payloads-encounters-a-script-execution-timeout-after-5000ms/12126 "2024-05-15T15:34:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [May 15, 2024, 8:44pm UTC](https://community.temporal.io/t/codec-for-handling-large-payloads-encounters-a-script-execution-timeout-after-5000ms/12126/4 "2024-05-15T20:44:59Z")

</div>

I would advise against the design that blindly uses a codec to offload large payloads to Redis. The problem is that loading such large payloads into the workflow is unnecessary in most situations and makes replay extremely slow.

I recommend implementing a solution that allows passing references to these payloads seamlessly from one activity to another.

---

_[View the full topic](https://community.temporal.io/t/codec-for-handling-large-payloads-encounters-a-script-execution-timeout-after-5000ms/12126)._
