Playbook freezes at "getting output with communicate()"

Hello,
I’m using Ansible to manage configuration of a device that has a similar terminal to Cisco devices, The below playbook works fine but for every 4 or 5 times it freezes at sometimes.
I use Ansible-Debug=1, when the playbook freezes, it does at this line:

3385 1471938419.90376: getting output with communicate()

Playbook: