Hi, I am looking for something to either run to lo...
# ask-community
r
Hi, I am looking for something to either run to look at long running flows and send alerts based upon these flow running over let's say an hour for example. Does anyone have a good reference to something similar or have any ideas for these types of issues I am having? Thanks in advance!
k
Hi @Richard Hughes, are your long running flows checking for data that comes in?
r
they are all different type of flows, but most of my flows are either checkign for data or running some ETL process, they seems to get hung up
k
Ah ok if you have a lot of data in your Flow, Prefect doesn’t do garbage collection natively so you may be running out of memory. I would try explicitly deleting them for the Python garbage collection. Are you using Dask?
r
yes, I am using dask - I am not familiar with garbage collection, do you have documentation around this sort of thing?
k
Actually for Dask it’s a bit different. The recommendation is to spin up the Dask cluster and let it handle memory manage (flow.executor = DaskExecutor()). Dask also in general tends to hang when getting resource starved so it’s hard to tell if it’s a resource thing or memory management thing.
You could do something like this with resource managers to tear down and clean the resources, then start when needed?
Oh sorry I forgot to mention there’s an Automation that will alert you if the flow is over an hour you can set in the UI
upvote 1
👍 1
r
@Kevin Kho what's the automation you mentioned about the alerts.? I am looking for this type of feature to be added into my environment. How can I implement this type of automation? My apologies on the delayed response. Thank in advance for your support!
k
Are you on Cloud?
r
Yes
k
Do you see an Automations tab on your Dashboard?
r
Yes I do
cc:@Ross Timm
k
You can configure those to perform actions (mainly alerts now) when the Flows hit certain conditions.