# Cleanup activity stream fails

**URL:** <https://forum.ansible.com/t/cleanup-activity-stream-fails/26284>\
**Category:** AWX Project\
**Created:** [December 13, 2017, 7:33pm UTC](https://forum.ansible.com/t/cleanup-activity-stream-fails/26284 "2017-12-13T19:33:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry.makovey](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@dmitry.makovey](https://forum.ansible.com/u/dmitry.makovey)\
**Post date:** [December 13, 2017, 7:33pm UTC](https://forum.ansible.com/t/cleanup-activity-stream-fails/26284/1 "2017-12-13T19:33:16Z")

</div>

I’ve got Ansible Tower instance that’s been running for over a year now. I’m trying to “cleanup activity stream” which ultimately fails every time I try launching it.

CLI invocaition was:

> # tower-manage cleanup\_activitystream --days=30 --dry-run -v 3
> 
> Killed
> 
> #

Same with the interface invocation. How can I cleanup items (even if manually)?

---

<div class="post-metadata">

**Author:** ![Bill\_Nottingham1](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@Bill\_Nottingham1](https://forum.ansible.com/u/Bill_Nottingham1)\
**Post date:** [December 13, 2017, 7:47pm UTC](https://forum.ansible.com/t/cleanup-activity-stream-fails/26284/2 "2017-12-13T19:47:14Z")

</div>

dmitry.makovey@stanford.edu (dmitry.makovey@stanford.edu) said:

> I've got Ansible Tower instance that's been running for over a year now.  
> I'm trying to "cleanup activity stream" which ultimately fails every time I  
> try launching it.
> 
> CLI invocaition was:
> 
> # tower-manage cleanup\_activitystream --days=30 --dry-run -v 3  
> Killed  
> #
> 
> Same with the interface invocation. How can I cleanup items (even if  
> manually)?

Please contact your Red Hat support rep for Tower issues. (That being said,  
you're running out of memory - add more.)

Bill

---

<div class="post-metadata">

**Author:** ![AlanCoding](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alancoding/32/301_2.png) [@AlanCoding](https://forum.ansible.com/u/AlanCoding)\
**Post date:** [December 13, 2017, 9:23pm UTC](https://forum.ansible.com/t/cleanup-activity-stream-fails/26284/3 "2017-12-13T21:23:17Z")

</div>

Replying to:

> How can I cleanup items (even if manually)?

Try applying .iterator() to the querysets in some of the loops inside of the management command. We have a few examples to go by in the cleanup jobs task. If you get something that fixes your problem, we would be happy to look at any pull request to pull your fix into the main branch.
