Undefined method `wait' for nil:NilClass

**Problem:I’m getting this error “undefined method `wait’ for nil:NilClass” when I submit a ansible playbook job with more then 100 hosts

**Expected outcome:run all the ansible roles in all the 2000 hosts

**Foreman and Proxy versions:Foreman and proxy version 3.3.1

**Foreman and Proxy plugin versions: foreman-tasks 6.0.2, foreman_ansible 7.1.4, foreman_discovery 21.0.1, foreman_remote_execution 7.2.2, katello 4.5.1

Distribution and version:

Other relevant data:

Are you using concurrency control (concurrency level or time span fields)?

Yes, only concurrency level * Concurrency level limited to: 30 tasks at a time

That, combined with the way how dynflow-sidekiq services are configured by default break concurrency control. Do you really need it? It can be reconfigured by hand, but it is a slightly involved process

Yes, I do need it because I must run ansible roles on all the hosts every 24 hours, now almost 10k but in the future will be around 40K. If I run it without limits foreman server and proxyes will be overload and not responding.

Then you need to ensure there is only one dynflow-sidekiq@* instance that consumes the remote_execution queue. Configurations for those services live in /etc/foreman/dynflow/