Start to close timeout due to server

When do we get these kind of errors?
The activity which got this error out just performs some s3 and data manipulation operations. But open the retry, The activity got completed successfully.
I want to understand what caused the issue.

{
“message”: “activity StartToClose timeout”,
“source”: “Server”,
“stackTrace”: “”,
“encodedAttributes”: null,
“cause”: null,
“timeoutFailureInfo”: {
“timeoutType”: “StartToClose”,
“lastHeartbeatDetails”: null
}
}

Temporal service monitors specified timeouts, and if an activity exceeds the StartToClose timeout, it is declared timed out and is either retried or, after all retries are exhausted according to the retry policy, the failure is delivered to the workflow that called the activity.

Note that the activity execution is not directly affected by exceeding the timeout. So it is possible for an activity to complete execution while the service believes that it already timed out. So you need to make sure that the StartToClose timeout is longer than a longest activity execution time. If an activity StartToClose timeout is long then an activity should heartbeat and specify shorter HeartbeatTimeout.