I want to limit the number of jobs each worker can take from a queue, so it doesn’t get overloaded by parallel heavy activities. I’m planning horizontally scale the number of workers if I need, but each one should run a maximum of 2 jobs(workflows) per worker, meanwhile, the queue grows if I don’t have enough workers.
Basically, it’s something like a basic FIFO queue.
I found a bunch of options like MaxConcurrentActivityExecutionSize - but all of them get an Activity as a unit, so what is the best strategy to use these parameters for jobs(workflow that includes all activities)?
This timeout defines how long a session should wait before timing out if no worker is available. I believe that you are hitting this timeout. Try increasing it.