# Getting MemoryError when executing task hdfs dfs -format; how to fix / troubleshoot?

**URL:** <https://forum.ansible.com/t/getting-memoryerror-when-executing-task-hdfs-dfs-format-how-to-fix-troubleshoot/29714>\
**Category:** Ansible Project\
**Created:** [February 19, 2019, 8:22pm UTC](https://forum.ansible.com/t/getting-memoryerror-when-executing-task-hdfs-dfs-format-how-to-fix-troubleshoot/29714 "2019-02-19T20:22:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgoldenberg](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@dgoldenberg](https://forum.ansible.com/u/dgoldenberg)\
**Post date:** [February 19, 2019, 8:22pm UTC](https://forum.ansible.com/t/getting-memoryerror-when-executing-task-hdfs-dfs-format-how-to-fix-troubleshoot/29714/1 "2019-02-19T20:22:18Z")

</div>

We have a task in our Ansible based deploy which performs formatting of HDFS using the hdfs dfs -format command.

This command causes a MemoryError. We can see that there is a Python process on the target box which gobbles up ~32GB of memory and then the failure occurs.

How can we troubleshoot this further?

Also, any ideas/recommendations on how to manage Ansible’s memory usage? I’m peeking into ansible\_memtotal\_mb… any config settings to look at or adjust?

Thanks,

- Dmitry
