Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

How-to clean up Queue and Results Collections in MongoDB ?

mooster71
6 - Meteoroid

At my company the Results output from failed workflows start to clog the MongoDB. As per design it seems that Alteryx Server retains all failed jobs in the Queue and Results collections even when we tell the server to keep run history and results for x days. I know the information can be cleared by deleting the Job history from the Gallery but this can only be done 1 by 1 and we have literally thousands of entries now in the MongoDB.

 

Has anyone found a method to clean-up the Queue and Results collections, either for old failed jobs or come to an entirely blank slate (eg remove all Results after a backup)?

9 REPLIES 9
mbarone
16 - Nebula
16 - Nebula

I didn't realize that it keeps logs of failed runs, even if you code the system settings to clear results after a set amount of time.  Maybe reach out to support on how to remove them for your server (probably will involve deleting Mongo documents/pages manually), and post an idea that the time setting for deleting results should apply to failures as well.

AsmiDesai
9 - Comet

You can delete entries from Results collection as below:

 

Open Alteryx Designer on Controller Server --> Go to Options --> Open View Schedules --> Click on Results

 

Here you can sort the results based on dates and can view 500 results at a time.
You can select required to delete and you can delete it by pressing minus button (-).

 

Hope this helps.

mbarone
16 - Nebula
16 - Nebula

@mooster71 

@mooster71 

 

Yes, that is the manual way to delete them.  I just posted an idea on the Server board for the failed job results to adhere to the same settings as the non-failed jobs.  Give it a like if you want (the more likes, the more chance of it getting implemented into the product 🙂 )
https://community.alteryx.com/t5/Alteryx-Server-Ideas/Make-Failed-Job-Results-Adhere-to-Controller-P...

mooster71
6 - Meteoroid

@AsmiDesai and @mbarone . Thanks! The manual option in the designer is at least a better option than the Gallery is offering but still a hassle and imho it one of the many omissions in the Alteryx Server product to enable admins to keep the server healthy.

I also asked the question to Alteryx support and got a very short and slightly annoying answer that it is default behavior and one should use external tools/commands to remove items from the MongoDB. I am now trying to get them to provide us with the advised tooling/commands so it can be made part of regular maintenance processes.

Having it in the settings would of course be the desired solution 🙂

TheCoffeeDude
11 - Bolide

@mooster71, were you able to get an answer from Alteryx support regarding a script or command or something that'll delete the old results?

mooster71
6 - Meteoroid

@TheCoffeeDude unfortunately Alteryx co has not been willing to help here, but quite some warnings that we might break integrity of the MongoDB when you start deleting collections. We have now resorted to a manual activity to clear-out the error results to keep the MongoDB in check. 

Would have been so easy to enable rotation of the ResultCollection for error-ed flows for Alteryx co....

TheCoffeeDude
11 - Bolide

I spent the better part of my weekend querying the database to figure out how much space was taken up by old results and queues - 30GB. The first run of deleting them resulted in mostly unusable server. Hopefully I can get something working soon. 

prpatel
11 - Bolide

Hello @AsmiDesai 

 

your solution from 2021 helped me clean my queue.

 

Thank you!!

 

-Pritesh.

AsmiDesai
9 - Comet

Hey @prpatel 

I am glad it helped you :)