Hello one question. I set up a 1800 second timeout...
# prefect-server
t
Hello one question. I set up a 1800 second timeout for a task, but it got stuck and didnt finish after that time out, it kept on waiting for hours and hours.
Copy code
@task(log_stdout=True, state_handlers=[handler], timeout=1800)
k
Hi @Tomás Emilio Silva Ebensperger, what is that task doing? This seems like something in the task was hanging
t
i am hitting an api that sometimes takes quite a bit to het the 200 http status. i want to fail the flow if it takes more than the specified time.
k
This seems like it should work. I’d have to check with the team and get back to you on Monday.
t
awesome man,, im goingt o try with shorter timeouts and test a little, thanks man!!
k
Sorry I forgot to ask the team today. Will leave a message with them and get back to you tomorrow.
t
thank you!
k
Did you try the shorter timeouts and see the same behavior?
t
i did
and it worked
so it is very weird
i did a short 10 second timeout, and it stopped like it should
z
Hey @Tomás Emilio Silva Ebensperger -- could you try turning on DEBUG level logs with the long timeout? Timeouts are a bit complicated and the logs will help us figure out where it's hanging. Could you also provide the output of
prefect diagnostics
?
t
Copy code
{
  "config_overrides": {
    "cloud": {
      "agent": {
        "auth_token": true
      }
    },
    "context": {
      "secrets": false
    }
  },
  "env_vars": [],
  "system_information": {
    "platform": "Linux-5.4.0-51-generic-x86_64-with-glibc2.29",
    "prefect_backend": "cloud",
    "prefect_version": "0.14.12",
    "python_version": "3.8.5"
  }
}
ok i set up the debug level, once i get the error , i will send you the logs
thank you
z
There's also a fix in 0.14.16 for some edge-case timeout issues https://github.com/PrefectHQ/prefect/pull/4384
t
ok 30 minutes have passed and no luck with the timeout
it was running that checking flow run state every 4 seconds and then it stopped
( i am not multithreading and the ram and cpy usage seem normal)
z
Hey @Tomás Emilio Silva Ebensperger -- could you share the logs when the task is set up? There should be some things about timeout handling
t