Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No file descriptors available #18

Closed
STUK-ZDP opened this issue Dec 28, 2018 · 1 comment
Closed

No file descriptors available #18

STUK-ZDP opened this issue Dec 28, 2018 · 1 comment

Comments

@STUK-ZDP
Copy link

使用接口调用时,当执行大量的主机链接,会出现文件打开数过多,或者程序僵死

  • No file descriptors available

2018-12-17 08:44:04 | ERROR - A serious error occurs
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/ansible_api/controller.py", line 195, in post
SyncPool, Api.run_play_book, name, yml_file, hosts, forks, host_info, my_vars)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/ansible_api/core.py", line 139, in run_play_book
rc = pbex.run()
File "/usr/lib/python3.6/site-packages/ansible/executor/playbook_executor.py", line 156, in run
result = self._tqm.run(play=play)
File "/usr/lib/python3.6/site-packages/ansible/executor/task_queue_manager.py", line 268, in run
self._initialize_processes(min(self._options.forks, iterator.batch_size))
File "/usr/lib/python3.6/site-packages/ansible/executor/task_queue_manager.py", line 117, in _initialize_processes
rslt_q = multiprocessing.Queue()
File "/usr/lib/python3.6/multiprocessing/context.py", line 102, in Queue
return Queue(maxsize, ctx=self.get_context())
File "/usr/lib/python3.6/multiprocessing/queues.py", line 47, in init
self._wlock = ctx.Lock()
File "/usr/lib/python3.6/multiprocessing/context.py", line 67, in Lock
return Lock(ctx=self.get_context())
File "/usr/lib/python3.6/multiprocessing/synchronize.py", line 163, in init
SemLock.init(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/usr/lib/python3.6/multiprocessing/synchronize.py", line 60, in init
unlink_now)
OSError: [Errno 24] No file descriptors available

  • A worker was found in a dead state

2018-12-17 08:46:04 | WARNING - Found a new type in result [<class 'ansible.playbook.Playbook'>]
2018-12-17 08:46:07 | ERROR - A serious error occurs
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/ansible_api/controller.py", line 195, in post
SyncPool, Api.run_play_book, name, yml_file, hosts, forks, host_info, my_vars)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/ansible_api/core.py", line 139, in run_play_book
rc = pbex.run()
File "/usr/lib/python3.6/site-packages/ansible/executor/playbook_executor.py", line 156, in run
result = self._tqm.run(play=play)
File "/usr/lib/python3.6/site-packages/ansible/executor/task_queue_manager.py", line 292, in run
play_return = strategy.run(iterator, play_context)
File "/usr/lib/python3.6/site-packages/ansible/plugins/strategy/linear.py", line 323, in run
results += self._wait_on_pending_results(iterator)
File "/usr/lib/python3.6/site-packages/ansible/plugins/strategy/init.py", line 672, in _wait_on_pending_results
raise AnsibleError("A worker was found in a dead state")
ansible.errors.AnsibleError: A worker was found in a dead state

查看进程打开文件,其中有很多类似下面的打开,似乎是进程间的通讯

ansible-a 21524 root DEL REG 0,41 13571641 /dev/shm/sem.QqlmoW
ansible-a 21524 root DEL REG 0,41 13571640 /dev/shm/sem.xlGJ5w
ansible-a 21524 root DEL REG 0,41 13571639 /dev/shm/sem.gN57M7
ansible-a 21524 root DEL REG 0,41 13571637 /dev/shm/sem.wMBxuI
ansible-a 21524 root DEL REG 0,41 13571636 /dev/shm/sem.tRKYbj
ansible-a 21524 root DEL REG 0,41 13571635 /dev/shm/sem.71RqTT
ansible-a 21524 root DEL REG 0,41 13571633 /dev/shm/sem.SY9TAu
ansible-a 21524 root DEL REG 0,41 13571632 /dev/shm/sem.wJepi5
ansible-a 21524 root DEL REG 0,41 13571631 /dev/shm/sem.W0wVZF
ansible-a 21524 root DEL REG 0,41 13571629 /dev/shm/sem.0pwtHg
ansible-a 21524 root DEL REG 0,41 13571628 /dev/shm/sem.pzt3oR
ansible-a 21524 root DEL REG 0,41 13571627 /dev/shm/sem.FaAE6r
ansible-a 21524 root DEL REG 0,41 13571625 /dev/shm/sem.AMKgO2
ansible-a 21524 root DEL REG 0,41 13571624 /dev/shm/sem.RsRUvD
ansible-a 21524 root DEL REG 0,41 13571623 /dev/shm/sem.alaAde
ansible-a 21524 root DEL REG 0,41 13583389 /dev/shm/sem.ATMiVO
ansible-a 21524 root DEL REG 0,41 13583386 /dev/shm/sem.vJp3Ip
ansible-a 21524 root DEL REG 0,41 13583385 /dev/shm/sem.z6Ugp2
ansible-a 21524 root DEL REG 0,41 13583384 /dev/shm/sem.Zdxv5E
ansible-a 21524 root DEL REG 0,41 13579310 /dev/shm/sem.CwHMLh
ansible-a 21524 root DEL REG 0,41 13579309 /dev/shm/sem.syhNYV
ansible-a 21524 root DEL REG 0,41 13579308 /dev/shm/sem.D72RbA
ansible-a 21524 root DEL REG 0,41 13579307 /dev/shm/sem.qWy5oe
ansible-a 21524 root DEL REG 0,41 13579306 /dev/shm/sem.b55jCS
ansible-a 21524 root DEL REG 0,41 13579305 /dev/shm/sem.454zPw
ansible-a 21524 root DEL REG 0,41 13579304 /dev/shm/sem.WAMR2a
ansible-a 21524 root DEL REG 0,41 13579303 /dev/shm/sem.tqcbgP
ansible-a 21524 root DEL REG 0,41 13579302 /dev/shm/sem.vemxtt
ansible-a 21524 root DEL REG 0,41 13579301 /dev/shm/sem.8ZTUG7
ansible-a 21524 root DEL REG 0,41 13579300 /dev/shm/sem.PeyjUL
ansible-a 21524 root DEL REG 0,41 13579299 /dev/shm/sem.jxbJ7p
ansible-a 21524 root DEL REG 0,41 13579298 /dev/shm/sem.S0J9k4
ansible-a 21524 root DEL REG 0,41 13579297 /dev/shm/sem.UvfByI
ansible-a 21524 root DEL REG 0,41 13579296 /dev/shm/sem.ZOF3Lm
ansible-a 21524 root DEL REG 0,41 13579295 /dev/shm/sem.Pg2wZ0
ansible-a 21524 root DEL REG 0,41 13579294 /dev/shm/sem.2Vm1cF
ansible-a 21524 root DEL REG 0,41 13579293 /dev/shm/sem.GDGwqj
ansible-a 21524 root DEL REG 0,41 13579292 /dev/shm/sem.sBc3DX
ansible-a 21524 root DEL REG 0,41 13579291 /dev/shm/sem.ROJARB
ansible-a 21524 root DEL REG 0,41 13579290 /dev/shm/sem.Bed94f
ansible-a 21524 root 9u sock 0,7 0t0 13577253 protocol: UNIX
ansible-a 21524 root 13u REG 253,0 0 67992384 /tmp/#67992384 (deleted)
ansible-a 21524 root 14u sock 0,7 0t0 13583390 protocol: TCP
ansible-a 21524 root 16w FIFO 0,9 0t0 13571622 pipe
ansible-a 21524 root 18w FIFO 0,9 0t0 13571626 pipe
ansible-a 21524 root 20w FIFO 0,9 0t0 13571630 pipe
ansible-a 21524 root 22w FIFO 0,9 0t0 13571634 pipe
ansible-a 21524 root 24w FIFO 0,9 0t0 13571638 pipe
ansible-a 21524 root 26w FIFO 0,9 0t0 13571642 pipe
ansible-a 21524 root 28w FIFO 0,9 0t0 13571646 pipe
ansible-a 21524 root 30w FIFO 0,9 0t0 13571650 pipe
ansible-a 21524 root 32w FIFO 0,9 0t0 13571654 pipe
ansible-a 21524 root 34w FIFO 0,9 0t0 13571658 pipe
ansible-a 21524 root 36w FIFO 0,9 0t0 13571662 pipe
ansible-a 21524 root 38w FIFO 0,9 0t0 13571666 pipe
ansible-a 21524 root 40w FIFO 0,9 0t0 13571670 pipe
ansible-a 21524 root 42w FIFO 0,9 0t0 13571674 pipe
ansible-a 21524 root 44w FIFO 0,9 0t0 13571678 pipe
ansible-a 21524 root 46w FIFO 0,9 0t0 13571682 pipe
ansible-a 21524 root 48w FIFO 0,9 0t0 13571686 pipe
ansible-a 21524 root 50w FIFO 0,9 0t0 13571690 pipe
ansible-a 21524 root 52w FIFO 0,9 0t0 13571694 pipe
ansible-a 21524 root 54w FIFO 0,9 0t0 13571698 pipe
ansible-a 21524 root 56w FIFO 0,9 0t0 13571702 pipe
ansible-a 21524 root 58w FIFO 0,9 0t0 13571706 pipe
ansible-a 21524 root 60w FIFO 0,9 0t0 13571710 pipe
ansible-a 21524 root 62w FIFO 0,9 0t0 13571714 pipe
ansible-a 21524 root 64w FIFO 0,9 0t0 13571718 pipe
ansible-a 21524 root 66w FIFO 0,9 0t0 13571722 pipe
ansible-a 21524 root 68w FIFO 0,9 0t0 13571726 pipe
ansible-a 21524 root 70w FIFO 0,9 0t0 13571730 pipe
ansible-a 21524 root 72w FIFO 0,9 0t0 13571734 pipe
ansible-a 21524 root 74w FIFO 0,9 0t0 13571738 pipe
ansible-a 21524 root 75r FIFO 0,9 0t0 13628594 pipe
ansible-a 21524 root 76r FIFO 0,9 0t0 13628595 pipe
ansible-a 21524 root 83r FIFO 0,9 0t0 13625587 pipe
ansible-a 21524 root 84r FIFO 0,9 0t0 13625588 pipe
ansible-a 21524 root 85u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 86r FIFO 0,9 0t0 13625589 pipe
ansible-a 21524 root 87u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 88r FIFO 0,9 0t0 13625590 pipe
ansible-a 21524 root 89u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 90r FIFO 0,9 0t0 13625591 pipe
ansible-a 21524 root 91u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 92r FIFO 0,9 0t0 13625592 pipe
ansible-a 21524 root 93u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 94r FIFO 0,9 0t0 13628554 pipe
ansible-a 21524 root 95u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 96r FIFO 0,9 0t0 13628555 pipe
ansible-a 21524 root 97u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 98r FIFO 0,9 0t0 13628556 pipe
ansible-a 21524 root 99u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 100r FIFO 0,9 0t0 13628557 pipe
ansible-a 21524 root 101u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 102r FIFO 0,9 0t0 13628561 pipe
ansible-a 21524 root 103u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 104r FIFO 0,9 0t0 13628562 pipe
ansible-a 21524 root 105u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 106r FIFO 0,9 0t0 13627624 pipe
ansible-a 21524 root 107u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 108r FIFO 0,9 0t0 13627625 pipe
ansible-a 21524 root 109u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 110r FIFO 0,9 0t0 13628563 pipe
ansible-a 21524 root 111u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 112r FIFO 0,9 0t0 13628564 pipe
ansible-a 21524 root 113u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 114r FIFO 0,9 0t0 13628565 pipe
ansible-a 21524 root 115u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 116r FIFO 0,9 0t0 13628566 pipe
ansible-a 21524 root 117u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 118r FIFO 0,9 0t0 13628567 pipe
ansible-a 21524 root 119u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 120r FIFO 0,9 0t0 13629481 pipe
ansible-a 21524 root 121u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 122r FIFO 0,9 0t0 13628592 pipe
ansible-a 21524 root 123u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 124r FIFO 0,9 0t0 13628593 pipe
ansible-a 21524 root 125u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 126u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 127u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 128u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 129u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 130u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 132u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 133u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 134u CHR 136,0 0t0 3 /dev/pts/0
ansible-a 21524 root 135u CHR 136,0 0t0 3

@lfbear
Copy link
Owner

lfbear commented Jan 3, 2019

please try new version, v0.5.0

@lfbear lfbear closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants