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

Mitogen causing remote host to use excessive memory #433

Open
dsgnr opened this issue Nov 26, 2018 · 3 comments
Open

Mitogen causing remote host to use excessive memory #433

dsgnr opened this issue Nov 26, 2018 · 3 comments
Labels
ansible Issues relating to Mitogen for Ansible bug Code feature that hinders desired execution outcome user-reported

Comments

@dsgnr
Copy link

dsgnr commented Nov 26, 2018

Hey!

Just wanted to put this out there and see if anyone else has seen this issue.
When using Mitogen, I've found that the hosts I'm running the playbooks against are using excessive amounts of memory, particularly with apt or yum. Commenting Mitogen from my ansible.cfg stops the issue occurring.

I'm using the latest Ansible version available and the latest master of Mitogen, running on a CentOS 7.5 box.

Thanks

@dw
Copy link
Member

dw commented Nov 26, 2018

Thanks for reporting this. It is almost certainly related to a single module. Can you confirm that running with "-e mitogen_task_isolation=fork" causes the problem to abate? Setting this globally will slow things down considerably -- it is best set on the single module causing the problem, and even better if that's done automatically by the extension.

If so, then the question becomes which module is causing the leak. In the past we have seen a resource leak due to DNF in CentOS (part of package management).

Be particularly suspicious of any playbook loops, as they can amplify otherwise tiny leaks.

Two options to help narrow it down:

  • Insert pause: halfway through your playbook and re-run it. Check memory usage. If it has exploded, insert another pause halfway from the start of the playbook to the first pause and rerun. Check again if memory has exploded. Continue inserting pause points earlier until you find a small enough subset that appears to trigger the issue, and feel free to report it here

  • Insert "debugger: always" in the playbook, and type 'c' repeatedly until you observe the memory problem. For a large playbook this can be more painful than the pause method

Finally, if your playbook is small enough, feel free to just mention all the modules you're using here and I can look for the problem by hand

@dw dw added bug Code feature that hinders desired execution outcome ansible Issues relating to Mitogen for Ansible user-reported labels Nov 26, 2018
@dw
Copy link
Member

dw commented Jan 19, 2019

Hey @dsgnr, were you able to figure out what was causing this?

@dsgnr
Copy link
Author

dsgnr commented Jan 19, 2019

Sorry, I didn't see the reply on this one! I'll get testing and get back to you ASAP by the end of the week

PatrickCoakley23 pushed a commit to cyara/mitogen that referenced this issue Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Issues relating to Mitogen for Ansible bug Code feature that hinders desired execution outcome user-reported
Projects
None yet
Development

No branches or pull requests

2 participants