Alexander
07/22/2021, 12:01 PM22 July 2021,11:22:45 MSK prefect.sometask ERROR Our job is failed
22 July 2021,11:22:45 MSK prefect.CloudTaskRunner DEBUG Task 'facebook_insights': Execution process closed, collecting result...
22 July 2021,11:22:45 MSK prefect.CloudTaskRunner DEBUG Task 'facebook_insights': Handling state change from Running to TimedOut
The "Execution process closed, collecting result..." log is coming from prefect.utilities.executors.run_with_multiprocess_timeout
. But i dont see any other logs from this functions (according to source code they exist there). There is indeed a timeout set for a task, like a 1 hour, but according to logs it finished in 20 minutes.
How can i debug this?
We are running latest prefect version with ECS agentZach Angell
Alexander
07/22/2021, 1:44 PMdef run(): ... raise signals.FAIL('somemessage')
thats itZach Angell
DEBUG
and re-run the flow? Debug logs should show what the Prefect Agent is using for a timeout
The simplest way to do this is in the UI
• Go to Flow -> Run -> Advanced Configuration
• Change the logging level dropdown setting to DEBUG
• Start the flow runAlexander
08/13/2021, 10:58 AMAlexander
08/16/2021, 11:10 AM@task(timeout=datetime.timedelta(seconds=60).seconds)
def debug_task():
raise signals.FAIL('Fail signal!!')
@task(timeout=datetime.timedelta(seconds=60).seconds)
def debug_task_exc():
raise ValueError('Common error')
Zach Angell
"Task '{name}': Attaching process based timeout handler..."
With a local agent and the same debug_task
format you specified, I'm not able to reproduce the issue.
from prefect import task, Flow
from prefect.engine import signals
import datetime
@task(timeout=datetime.timedelta(seconds=60).seconds)
def foo():
raise signals.FAIL("Fail signal")
with Flow("timeout signal fail testing") as flow:
foo()
flow.register("test")
Zach Angell
Alexander
08/17/2021, 6:48 AMZach Angell
Zach Angell