# History size exceeds warn limit - scheduled workflow

**URL:** <https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651>\
**Category:** Community Support\
**Created:** [January 12, 2024, 12:51am UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651 "2024-01-12T00:51:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/davidn/32/3307_2.png) [@davidn](https://community.temporal.io/u/davidn)\
**Post date:** [January 12, 2024, 12:51am UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/1 "2024-01-12T00:51:58Z")

</div>

I started receiving the “history size exceeds warn limit.” warning from a temporal scheduled workflow:

`{"level":"warn","ts":"2023-12-19T17:59:00.458Z","msg":"history size exceeds warn limit.","service":"history","shard-id":1280,"address":"10.0.0.121:7234","wf-namespace-id":"79084a7e-3106-4464-9ce9-64132a3a0168","wf-id":"temporal-sys-scheduler:agent_heartbeat","wf-run-id":"2f6f18ed-8de7-490a-b73d-81e6db37f7ed","wf-history-size":4480999,"wf-event-count":14300,"logging-call-at":"context.go:880"}`

It’s my understanding that ContinueAsNew gets used automatically after 500 actions for scheduled workflows and even though I do see from the temporal logs that ContinueAsNew started being used, I still ended up with this warning.

Is there a recommended approach for handling this?

1. increase warning and max threshold?
2. reduce number of actions before Scheduled workflows switches to ContinueAsNew?
3. other?

Also is there prometheus stat where the history size is tracked?

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [January 12, 2024, 6:06pm UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/2 "2024-01-12T18:06:29Z")

</div>

Hi @davidn

you need to invoke ContinueAsNew from your workflow code explicitly, ideally before the workflow history reaches 10k events.

Can I ask which sdk do you use?

The warn is emmited here [temporal/service/history/workflowExecutionContext.go at v1.7.0 · temporalio/temporal · GitHub](https://github.com/temporalio/temporal/blob/v1.7.0/service/history/workflowExecutionContext.go#L1238) , you can check other limits here [Self-hosted Temporal Cluster defaults | Temporal Documentation](https://docs.temporal.io/self-hosted-guide/defaults)

Regards,  
Antonio

---

<div class="post-metadata">

**Author:** ![davidn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/davidn/32/3307_2.png) [@davidn](https://community.temporal.io/u/davidn)\
**Post date:** [January 12, 2024, 6:41pm UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/3 "2024-01-12T18:41:47Z")

</div>

Hi Antonio,  
Thanks for the reply. This is a Temporal Schedules workflow so I do not have control over how the workflow is invoked.

I’m using the java sdk if that helps, but I am thinking the solution will be from within Temporal itself since Temporal Schedules is the one invoking the workflow.

---

<div class="post-metadata">

**Author:** ![dnr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/dnr/32/1041_2.png) [@dnr](https://community.temporal.io/u/dnr)\
**Post date:** [January 16, 2024, 6:06pm UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/4 "2024-01-16T18:06:08Z")

</div>

You can just ignore the warning. In newer versions of the server it uses the continue-as-new-suggested hint so it shouldn’t get to the warn limit.

Although it’s unusual to get that high… are you doing lots of UpdateSchedule or PatchSchedule calls?

---

<div class="post-metadata">

**Author:** ![davidn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/davidn/32/3307_2.png) [@davidn](https://community.temporal.io/u/davidn)\
**Post date:** [January 16, 2024, 8:03pm UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/5 "2024-01-16T20:03:58Z")

</div>

Thanks!

Do you know what version continue-as-new-suggested is set? I’m running Temporal server 1.22.2.

This schedule is running every minute, I’m using it to execute a heartbeat. The schedule itself is never updated after it is created (no calls to either UpdateSchedule or PatchSchedule)

---

<div class="post-metadata">

**Author:** ![dnr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/dnr/32/1041_2.png) [@dnr](https://community.temporal.io/u/dnr)\
**Post date:** [January 16, 2024, 8:34pm UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/6 "2024-01-16T20:34:14Z")

</div>

It’s in server 1.22.3 (and will be in 1.23.0).

If you’re willing to share the history, I wouldn’t mind taking a look to see if there’s a bug. You can send it in a DM on slack ([Slack](https://temporalio.slack.com/team/U0250TUG1V2))

---

<div class="post-metadata">

**Author:** ![ammar-deriv](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@ammar-deriv](https://community.temporal.io/u/ammar-deriv)\
**Post date:** [September 26, 2025, 7:33am UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/8 "2025-09-26T07:33:29Z")

</div>

> [@ammar-deriv](#):
>
> What about for Python SDK? How to solve it? I always get this warning too. My package version is 1.15.0.

What about for Python SDK? How to solve it? I always get this warning too. My package version is 1.15.0.

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [October 2, 2025, 3:05pm UTC](https://community.temporal.io/t/history-size-exceeds-warn-limit-scheduled-workflow/10651/9 "2025-10-02T15:05:01Z")

</div>

Hi,

it is the server, not the SDK , emitting these warnings, Does this happen for schedules as well or only for “normal” workflows?
