# Activity Timeout and Temporal server connectivity issue

**URL:** <https://community.temporal.io/t/activity-timeout-and-temporal-server-connectivity-issue/8869>\
**Category:** Community Support\
**Tags:** activity, typescript-sdk\
**Created:** [July 17, 2023, 2:31pm UTC](https://community.temporal.io/t/activity-timeout-and-temporal-server-connectivity-issue/8869 "2023-07-17T14:31:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jwatkins](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/jwatkins/32/2581_2.png) [@jwatkins](https://community.temporal.io/u/jwatkins)\
**Post date:** [July 18, 2023, 2:50pm UTC](https://community.temporal.io/t/activity-timeout-and-temporal-server-connectivity-issue/8869/2 "2023-07-18T14:50:34Z")

</div>

> [@gautam.g4](#):
>
> Activity not found on completion. This may happen if the activity has already been cancelled but completed anyway. message: “invalid activityID or activity already timed out or invoking workflow is completed”, details: b"\x08\x05\x12Rinvalid activityID or activity already timed out or invoking workflow is completed\x1aB\n@type.googleapis.com/temporal.api.errordetails.v1.NotFoundFailure"

The most probable cause for this error is that the activity worker reports completion status _after_ the activity task timed out on the server side. An activity timeout _does not_ forcibly stops execution of the activity code.

For example, let’s suppose that activity `SomeVeryLongActivity` is scheduled with a start-to-close timeout of 10 seconds, but sometime takes more than 20 seconds to complete. In that case, the activity code will continue executing after the 10 seconds timeout, but when the activity’s completion gets reported (after 20 seconds), then the server will refuse it, as the activity task token is not longer valid.

Possible solutions to this are:

- Increase the timeout constraints on your activities (start-to-close and/or schedule-to-close)
- Send heartbeats from your activity

---

_[View the full topic](https://community.temporal.io/t/activity-timeout-and-temporal-server-connectivity-issue/8869)._
