Hang issue when use ansible

More accurate description of my issue is: that is ssh’s issue.
Because sometimes I use ssh directly to connect to some linux computer,it also hang.Yes.it just hang,no timeout,no return,I don’t know why,maybe it is something wrong with network.
If this happen,ansible will hang and no return,I give timeout arg to ansible.runner.Runner and still no return.And I can not find out which computer hang because of no log.

Any suggestion to this issue?
Thanks.

Try setting “UseDNS no” in your target machine’s sshd_config.

Brian Coca