https://prefect.io logo
g

Grant

08/02/2023, 2:11 PM
Hi all, I know I'm in the minority using both local storage and local infra to run my flows, but it has been working well for us until I discovered that prefect was eating up my local storage. Are the files being generated in the directory .prefect/storage the log files? This is much larger than I would have expected it to be. I also noticed that the tmp files being generated for flow code don't always get deleted once the flow has completed. I can write a flow to auto-delete these tmp files for me, but is there a better way to do this?
1
j

Jake Kaplan

08/02/2023, 9:00 PM
are you returning large objects out of your flow runs/task runs? this is likely from result persistence as opposed to logs?
g

Grant

08/02/2023, 9:06 PM
I am logging my results, but several tasks in several of my flows return dataframes with up to ~50,000 rows to be used in passing to other tasks. I don't have any parameters set to persist the results, but do the results persist by default?
I don't need the results to persist, I only need to read in data to be output to a database then I don't care about the data afterward. Also, are these files periodically deleted (i.e., after 7 days) or do I need to manually delete them?
j

Jake Kaplan

08/02/2023, 9:22 PM
It depends what you're doing: https://docs.prefect.io/2.11.2/concepts/results/#persisting-results most of the time
result_persistence
is off, but theres a few features would toggle it on
👀 1
the files won't be deleted automatically
💡 1
g

Grant

08/02/2023, 9:26 PM
Good to know, thank you! I'll take a look at the docs, I wrote a script that cleans that directory for me but I wanted to make sure that was necessary.
j

Jake Kaplan

08/02/2023, 9:27 PM
no problem! let me know if that resolves what you're seeing
g

Grant

08/03/2023, 2:12 PM
@Jake Kaplan that solved my problem! I wish I would have found that documentation sooner. Thanks again so much!
🙌 1