Hey there, for the run history, how long it keeps ...
# prefect-community
r
Hey there, for the run history, how long it keeps the logs? If a flow runs extensively long time, will it continue to finish even though the run history is wiped out? How can i track the logs for those long running flows?
1
k
Do you mean the logs for all run? A flow run should continue to finish even though the run history is wiped out. You can track the logs either though your CLI or the UI
r
Thanks, @Khuyen Tran. The UI has been wiped out for this flow, I dont see anywhere else to find them in the UI. What is the CLI command to show the logs for a specific flow run?
k
So you have wiped the history of all your flow runs?
r
i am under the impression that there is a limit of how long the run history keeps the previous runs( unfinished runs), my flow has been running for > 15 days, so today when I went back to the UI and check, the run history is wiped out. Not me proactively cleaned the run history.
how can i retrieve the logs for a currently running flow through CLI? There is nothing in the UI
k
I checked with the team and the logs for flow runs that are more than 7 days old are deleted for free users. So you will not be able to achieve the logs for runs > 15 days
r
Thanks, but is the flow still running? how can i check the status of the flow if it is more than 7 days?
or another way to put the question, if it is more than 7 days, will the flow be shut down from prefect?
b
Hello Ray, we noticed that you are on the Aven tenant and that has a log retention period of 14 days. We're confirmed with our team what the expected behaviour is here.
For the flow you mentioned here 'DM_train_XGBBO_CV_SKOPT_dev' I was unable to see any flow run records at first glance.
Just to confirm, this is a case where a flow run takes longer than 15 days to complete?
Not that the flow has had multiple runs executed over a 15 day period?
r
That is correct. Thanks for looking at it. The flow is a hyperparameter search with bayesian optimization. And it takes more than 15 days to finish all the search rounds. I have in total 4 runs that are started at similar time and they are all disappeared now. From our EC2 console, i can still see 2 clusters for the 4 runs that are still running.
b
Hello Ray, I've confirmed with the team what is occurring here. The standard plan currently offers a 14 day retention period for flow run data and logs. The countdown for the retention period begins at the
scheduled_start_time
of the flow run. Due to the fact that this flow run takes longer than 14 days to complete, the logs and data are cleared prior to its completion. We recommend reaching out to your account executive or sales@prefect.io to request increasing the retention period, which should resolve this issue on a forward basis.
r
So it is not only about the logs, it is also about the flow that is currently running, even though the clusters are with Aven? So it means we cannot perform persistent ML flows with prefect which exceeds the retention period?
Is there anyway to retrieve the last logs snapshot?
b
Correct, the flow runs and logs will be cleared after the retention period.
Currently, I don't believe there is a way to retrieve the last logs snapshot
r
Got it. Thanks. we will pay attention to the retention period next time.
245 Views