# wait\_for host : 100% CPU on deploy host

**URL:** <https://forum.ansible.com/t/wait-for-host-100-cpu-on-deploy-host/18309>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [May 26, 2015, 1:55pm UTC](https://forum.ansible.com/t/wait-for-host-100-cpu-on-deploy-host/18309 "2015-05-26T13:55:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [May 26, 2015, 1:55pm UTC](https://forum.ansible.com/t/wait-for-host-100-cpu-on-deploy-host/18309/1 "2015-05-26T13:55:09Z")

</div>

it is basically a 'wait loop' but it does have some sleeps in there to  
avoid chewing on CPU, in your case the statement wil just do nothing  
for 20s and then wait for another 300 w/o doing anything. This path  
has no internal sleep in the loop (path and socket do) so that is  
probably why the CPU is being killed by a tight loop.

test out this PR and see if it fixes the issue for you  
[https://github.com/ansible/ansible-modules-core/pull/1422](https://github.com/ansible/ansible-modules-core/pull/1422)
