Hey ours is a self hosted temporal server.
Yesterday we as encountered and issue with history size. Our workflow has hit the default temporal’s history size limit 50MB. So how can i increase this limit?
Is there anyway that i can increase the limit from code itself, for specific workflows?
you can overwrite the following dynamic config on the server side.
limit.historySize.error
temporal/common/dynamicconfig/constants.go at a4929062edc3e659cbf2f7f44db97c8ab59f8a5f · temporalio/temporal · GitHublimit.historyCount.error
temporal/common/dynamicconfig/constants.go at a4929062edc3e659cbf2f7f44db97c8ab59f8a5f · temporalio/temporal · GitHub
but the recommendation is to implement the workflow to Continue-as-new before reaching this limit. All SDKs provide an API method that will help you to decide when to do it
- Java - Workflow.getInfo().isContinueAsNewSuggested()
- Go - GetContinueAsNewSuggested() from GetWorkflowInfo
- Python - is_continue_as_new_suggested from Workflow.info
- TypeScript - workflowInfo().continueAsNewSuggested
Antonio
Hello @antonio.perez,
Before updating the config in production I first want to check the config update in my local first. In local I’m using the following repo to build a docker container GitHub - temporalio/docker-compose: Temporal docker-compose files
If I need to update the default limit of history size and history count, can i update in development.sql file of this repo? if yes can you please share the syntax.
Yes, that would be if you use the default docker-compose
But I would consider using continue-as-new instead
Antonio