# Money Transfer Example (Java) - occasionally WorkflowTaskTimedOut happens

**URL:** <https://community.temporal.io/t/money-transfer-example-java-occasionally-workflowtasktimedout-happens/2325>\
**Category:** Community Support\
**Tags:** general-impl, workflow-config\
**Created:** [June 8, 2021, 8:46am UTC](https://community.temporal.io/t/money-transfer-example-java-occasionally-workflowtasktimedout-happens/2325 "2021-06-08T08:46:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![samar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/samar/32/12_2.png) [@samar](https://community.temporal.io/u/samar)\
**Post date:** [June 8, 2021, 4:47pm UTC](https://community.temporal.io/t/money-transfer-example-java-occasionally-workflowtasktimedout-happens/2325/2 "2021-06-08T16:47:37Z")

</div>

Hey @animesh, WorkflowTaskTimedOut might happen in various failure situation. The most common is when a worker restarts which has workflow executions cached. Any new event for those workflow will result in a WorkflowTask being scheduled on host specific tasklist, but since there is no poller on the tasklist it results in a WorkflowTaskTimedOut and new workflow task getting scheduled on global tasklist so another worker can pick up the WorkflowTask.

Some other useful forum posts which goes into more details about WorkflowTask:

> [@What is the difference between WorkflowRunTimeout and WorkflowTaskTimeout?](https://community.temporal.io/t/what-is-the-difference-between-workflowruntimeout-and-workflowtasktimeout/1602):
>
> Workflow docs ([Workflows | Temporal](https://docs.temporal.io/docs/workflows/)) mention WorkflowRunTimeout and WorkflowTaskTimeout. Run timeout clearly covers the entire run of the workflow, but I don’t understand what is a task here?

> [@Sleep in workflow](https://community.temporal.io/t/sleep-in-workflow/1650):
>
> Hello everyone, i was doing some test using the Bank example (Java client), and for slow down the workflows i tried to put a Thread.sleep(5)… Now this is not right i guess since the worker and the server can’t communicate anymore and the WorkflowTaskFailed : io.temporal.internal.sync.PotentialDeadlockException: Potential deadlock detected: workflow thread “workflow-method” didn’t yield control for over a second. make sense… But, if during the sleep, i stop the worker and then i restart it, the…

---

_[View the full topic](https://community.temporal.io/t/money-transfer-example-java-occasionally-workflowtasktimedout-happens/2325)._
