-
Notifications
You must be signed in to change notification settings - Fork 199
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
ansible_mitogen: ValueError: filedescriptor out of range in select() #957
Comments
Facing exactly the same issue here.
|
I did some more research and also tried the |
Got into this error again..
As expected, this indeed hits the 1024 limit that I mentioned above due to the way Turns out, we had the following caching configuration is
I changed this to the following, after which it worked fine.
I will check in the |
Notes to self
|
I'm targetting this problem for Mitogen 0.3.7. I would like to check some things, to prevent it re-occuring and improve my understanding
Sorry for the long wait. Thank you each for investigating in the mean time. |
Unfortunately not. This happened on larger playbooks on many machines being deployed at once.
This was because a limit of 1024 fds, see #967 (comment) All I can say is that this workaround worked for my collegues and me since that PR with all ansible versions from 2.12.8 to 2.16.4 😃 |
unfortunately not, sorry
You're right: I think it's better to use mitogen.parent.PREFERRED_POLLER as the replacement |
Was able reproduce this with 40 hosts with ansible-core 2.15.10/ansible 8.7.0 and ansible-core 2.16.6/ansible 9.4.0
|
This patch works with ansible 2.15.10 and 2.16.5 |
Just to add that I locally applied https://github.com/mitogen-hq/mitogen/pull/984/files and so far so good on my staging/test instance |
Lines 902 to 906 in 3f7a0f7
Digging through old tickets and commits PollPoller is slightly better for "small FD counts" (I don't know how many counts as small), and EpollPoller or KqueuePoller are better at large FD counts (again, I don't have a number). On Mitogen 0.2.x and Python 2.4/2.5 PREFERRED_POLLER can only be PollPoller or Poller. Python 2.7 shipped with older OSX (10.4) also ended up PREFERRED_POLLER==Poller. On Mitogen 0.3.x (minimum Python 2.7) in 2024 PREFERRED_POLLER will probably always be EpollPoller or KqueuePoller. PREFERRED_POLLER is slight misnomer. It's more like most feature-full poller available. |
Report of a Python 3.8 on mac OS (version unspecified) lacking |
This - Clarifies and corrects docstrings and comments based on investigation for mitogen-hq#957 - Removes unused `Poller*._repr` attributes - De-duplicates data lookups in `Poller._poll()` et al - Introduces `mitogen.parent.POLLERS` & `mitogen.parent.POLLER_LEIGHTWEIGHT` ``` @@ -1,7 +1,7 @@ SSH command size: 759 -Bootstrap (mitogen.core) size: 17862 (17.44KiB) +Bootstrap (mitogen.core) size: 17899 (17.48KiB) Original Minimized Compressed -mitogen.parent 98171 95.9KiB 50569 49.4KiB 51.5% 12742 12.4KiB 13.0% +mitogen.parent 96988 94.7KiB 49853 48.7KiB 51.4% 12708 12.4KiB 13.1% mitogen.fork 8436 8.2KiB 4130 4.0KiB 49.0% 1648 1.6KiB 19.5% mitogen.ssh 10892 10.6KiB 6952 6.8KiB 63.8% 2113 2.1KiB 19.4% ```
This - Clarifies and corrects docstrings and comments based on investigation for mitogen-hq#957 - Removes unused `Poller*._repr` attributes - De-duplicates data lookups in `Poller._poll()` et al - Introduces `mitogen.parent.POLLERS` & `mitogen.parent.POLLER_LEIGHTWEIGHT` ``` @@ -1,7 +1,7 @@ SSH command size: 759 -Bootstrap (mitogen.core) size: 17862 (17.44KiB) +Bootstrap (mitogen.core) size: 17899 (17.48KiB) Original Minimized Compressed -mitogen.parent 98171 95.9KiB 50569 49.4KiB 51.5% 12742 12.4KiB 13.0% +mitogen.parent 96988 94.7KiB 49853 48.7KiB 51.4% 12708 12.4KiB 13.1% mitogen.fork 8436 8.2KiB 4130 4.0KiB 49.0% 1648 1.6KiB 19.5% mitogen.ssh 10892 10.6KiB 6952 6.8KiB 63.8% 2113 2.1KiB 19.4% ```
This - Clarifies and corrects docstrings and comments based on investigation for mitogen-hq#957 - Removes unused `Poller*._repr` attributes - De-duplicates data lookups in `Poller._poll()` et al - Introduces `mitogen.parent.POLLERS` & `mitogen.parent.POLLER_LEIGHTWEIGHT` ``` @@ -1,7 +1,7 @@ SSH command size: 759 -Bootstrap (mitogen.core) size: 17862 (17.44KiB) +Bootstrap (mitogen.core) size: 17913 (17.49KiB) Original Minimized Compressed -mitogen.parent 98171 95.9KiB 50569 49.4KiB 51.5% 12742 12.4KiB 13.0% +mitogen.parent 96974 94.7KiB 49839 48.7KiB 51.4% 12701 12.4KiB 13.1% mitogen.fork 8436 8.2KiB 4130 4.0KiB 49.0% 1648 1.6KiB 19.5% mitogen.ssh 10892 10.6KiB 6952 6.8KiB 63.8% 2113 2.1KiB 19.4% ```
This - Clarifies and corrects docstrings and comments based on investigation for mitogen-hq#957 - Removes unused `Poller*._repr` attributes - Eliminates some uses of `getattr()` - Introduces `mitogen.parent.POLLERS` & `mitogen.parent.POLLER_LIGHTWEIGHT` Preamble size change ``` @@ -1,7 +1,7 @@ SSH command size: 759 -Bootstrap (mitogen.core) size: 17862 (17.44KiB) +Bootstrap (mitogen.core) size: 17934 (17.51KiB) Original Minimized Compressed -mitogen.parent 98171 95.9KiB 50569 49.4KiB 51.5% 12742 12.4KiB 13.0% +mitogen.parent 96979 94.7KiB 49844 48.7KiB 51.4% 12697 12.4KiB 13.1% mitogen.fork 8436 8.2KiB 4130 4.0KiB 49.0% 1648 1.6KiB 19.5% mitogen.ssh 10892 10.6KiB 6952 6.8KiB 63.8% 2113 2.1KiB 19.4% ```
Works for me! Thank you for your work @moreati! |
This - Clarifies and corrects docstrings and comments based on investigation for mitogen-hq#957 - Removes unused `Poller*._repr` attributes - Eliminates some uses of `getattr()` - Introduces `mitogen.parent.POLLERS` & `mitogen.parent.POLLER_LIGHTWEIGHT` Preamble size change ``` @@ -1,7 +1,7 @@ SSH command size: 759 -Bootstrap (mitogen.core) size: 17862 (17.44KiB) +Bootstrap (mitogen.core) size: 17934 (17.51KiB) Original Minimized Compressed -mitogen.parent 98171 95.9KiB 50569 49.4KiB 51.5% 12742 12.4KiB 13.0% +mitogen.parent 96979 94.7KiB 49844 48.7KiB 51.4% 12697 12.4KiB 13.1% mitogen.fork 8436 8.2KiB 4130 4.0KiB 49.0% 1648 1.6KiB 19.5% mitogen.ssh 10892 10.6KiB 6952 6.8KiB 63.8% 2113 2.1KiB 19.4% ```
…kerProcess `mitogen.parent.POLLER_LIGHTWEIGHT` will normally be `PollPoller`, falling back to `EpollPoller`, `KqueuePoller`, or `Poller`. Fixes mitogen-hq#957 Co-authored-by: Luca Berruti <[email protected]> Co-authored-by: Philippe Kueck <[email protected]>
This - Clarifies and corrects docstrings and comments based on investigation for mitogen-hq#957 - Removes unused `Poller*._repr` attributes - Eliminates some uses of `getattr()` - Introduces `mitogen.parent.POLLERS` & `mitogen.parent.POLLER_LIGHTWEIGHT` Preamble size change ``` @@ -1,7 +1,7 @@ SSH command size: 759 -Bootstrap (mitogen.core) size: 17862 (17.44KiB) +Bootstrap (mitogen.core) size: 17934 (17.51KiB) Original Minimized Compressed -mitogen.parent 98171 95.9KiB 50569 49.4KiB 51.5% 12742 12.4KiB 13.0% +mitogen.parent 96979 94.7KiB 49844 48.7KiB 51.4% 12697 12.4KiB 13.1% mitogen.fork 8436 8.2KiB 4130 4.0KiB 49.0% 1648 1.6KiB 19.5% mitogen.ssh 10892 10.6KiB 6952 6.8KiB 63.8% 2113 2.1KiB 19.4% ```
…kerProcess `mitogen.parent.POLLER_LIGHTWEIGHT` will normally be `PollPoller`, falling back to `EpollPoller`, `KqueuePoller`, or `Poller`. Fixes mitogen-hq#957 Co-authored-by: Luca Berruti <[email protected]> Co-authored-by: Philippe Kueck <[email protected]>
Which version of Ansible are you running?
ansible 6.2.0
ansible-core 2.13.3
Yes, I like living on the edge!
Is your version of Ansible patched in any way?
No.
Are you running with any custom modules, or
module_utils
loaded?I don't think so!
Have you tried the latest master version from Git?
Yes, tried w/ 8cda5f5.
Do you have some idea of what the underlying problem may be?
No.
Mention your host and target OS and versions
Host - Fedora 36
Target - CentOS Stream 8
Mention your host and target Python versions
Host - Python 3.10.6
Target - Python 3.6.8
If reporting a performance issue, mention the number of targets and a rough
description of your workload (lots of copies, lots of tiny file edits, etc.)
12 hosts:
ansible_connection: local
On each host I maintain about 120 users and make sure about 60 users do not exist (they left the company).
Module used is: community.mysql.mysql_user
200 lines of output around the point of the error
version along with output of "ansible-config dump --only-changed".
Would really love this as
mitogen
is lowering my playbook time from over 600 seconds to under 120 seconds!The text was updated successfully, but these errors were encountered: