# One server is slow to respond to ansible (but does) gather\_facts

**URL:** <https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070>\
**Category:** Ansible Project\
**Created:** [July 17, 2018, 5:43pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070 "2018-07-17T17:43:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [July 17, 2018, 5:43pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/1 "2018-07-17T17:43:44Z")

</div>

Just trying to track down what changed on a server. I will run a playbook against 20-30 servers and all of them (configured the same with ansible) respond quickly to gather\_facts; however, just one server takes its own sweet time to respond. It wasn’t this way at first, but changed in the patch couple of months. Any ideas as to track down why it is doing that? All other ssh connections to the server are responsive as expected…

---

<div class="post-metadata">

**Author:** ![mhalano](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mhalano/32/1815_2.png) [@mhalano](https://forum.ansible.com/u/mhalano)\
**Post date:** [July 17, 2018, 6:12pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/2 "2018-07-17T18:12:47Z")

</div>

Could I suggest to execute an ad-hoc command using the “setup” module against this machine and do all the debug?

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [September 26, 2018, 10:36pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/3 "2018-09-26T22:36:03Z")

</div>

Marcos,

I can execute an ad-hoc, but I don’t know what you mean by “all the debug”–or how to do that.  
If I run the following, it returns promptly:

`  
root@ansible:/etc/ansible # ansible myserver -m debug  
myserver | SUCCESS =\> {  
“msg”: “Hello world!”  
}

`

Kai,

I cannot find any IO issues on the server in regards to the things you specified. LVM isn’t involved, but NFS is. It is connected to the same NFS server as all of my other servers. In addition, I don’t see any stale files, or mounts. Things look normal on the server other than it taking longer to respond than my other servers… I am still digging into this to see if I can find the cause for the slow response.

---

<div class="post-metadata">

**Author:** ![S\_C\_Rigler](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@S\_C\_Rigler](https://forum.ansible.com/u/S_C_Rigler)\
**Post date:** [September 26, 2018, 11:14pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/4 "2018-09-26T23:14:14Z")

</div>

Is normal ssh to the server slow or only with Ansible?

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [September 27, 2018, 5:24pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/5 "2018-09-27T17:24:02Z")

</div>

Normal SSH to the server is quick and responsive. If I ssh from the ansible server it is even quicker than from my current location directly to the server (The ansible server is on the same network as the other server, so this makes sense). Once the facts are gathered, everything else in an ansible playbook is speedy as any other server, it is just slow to gather facts. If I exclude gathering facts it is as responsive as any other server.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [September 27, 2018, 5:39pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/6 "2018-09-27T17:39:35Z")

</div>

You can use the 'subset' option in fact gathering to narrow down what  
is being soo slow on that machine (likely culprits are hardware or  
network), this often is a symptom of some problem with the server  
being slow or unresponsive to some device query.

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [September 27, 2018, 8:03pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/7 "2018-09-27T20:03:11Z")

</div>

ansible myserver -m setup -a ‘gather\_subset=hardware’ is definitely the culprit. Do you know of any way to break down the hardware subset to further narrow this down?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [September 27, 2018, 8:19pm UTC](https://forum.ansible.com/t/one-server-is-slow-to-respond-to-ansible-but-does-gather-facts/28070/8 "2018-09-27T20:19:47Z")

</div>

You can use ANSIBLE\_DEBUG=1 and check the target's syslog to see which  
commands are run and how long till 'next command', other than that is  
is just debugging the setup module while executing it
