I am facing the error when running large amount of workflows (1M+)
<coroutine not found: stack trace truncated: stackBuf is too small>
any suggestions?
maxim
January 10, 2025, 10:54pm
2
Consider reducing the cache size:
// Also there is no guarantee that this API is not going to change.
func EnableVerboseLogging(enable bool) {
internal.EnableVerboseLogging(enable)
}
// SetStickyWorkflowCacheSize sets the cache size for sticky workflow cache. Sticky workflow execution is the affinity
// between workflow tasks of a specific workflow execution to a specific worker. The benefit of sticky execution is that
// the workflow does not have to reconstruct state by replaying history from the beginning. The cache is shared between
// workers running within same process. This must be called before any worker is started. If not called, the default
// size of 10K (which may change) will be used.
func SetStickyWorkflowCacheSize(cacheSize int) {
internal.SetStickyWorkflowCacheSize(cacheSize)
}
// PurgeStickyWorkflowCache resets the sticky workflow cache. This must be called only when all workers are stopped.
func PurgeStickyWorkflowCache() {
internal.PurgeStickyWorkflowCache()
}
// SetBinaryChecksum sets the identifier of the binary(aka BinaryChecksum).
// The identifier is mainly used in recording reset points when respondWorkflowTaskCompleted. For each workflow, the very first
Thank you. What is the recommended size. we are currently using
worker.SetStickyWorkflowCacheSize(20000)
maxim
January 13, 2025, 7:20pm
4
It heavily depends on the workflow implementation. Experiment with a small number to see if it fixes the issue and then try increasing it until the host is saturated.