The task in a pending state is means that you do not have enough worker slots in the Middle Managers to run them concurrently. You can reduce the number of tasks or increase the capacity (druid.worker.capacity) in the Middle Managers. It is usually configured to (vcpus-1) if the middle manager is running on its own or less if it shares resources with another process.