Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 3.19 KB

File metadata and controls

51 lines (34 loc) · 3.19 KB

Python Troubleshooting Guide

This section provides a list of common issues and solutions for troubleshooting when using the Temporal Python SDK. Always refer first to the sdk-python documentation and the official documentation for the most up-to-date information.

If you landed here by accident, please feel free to reach out through the community channels or open a support ticket if you are a Temporal Cloud customer.

WorkflowTaskTimeout

Possible Causes and Solutions

The gRPC payload size exceed the limit.

A common scenario is when there is a large number of activities (or child workflows) scheduled concurrently in a loop. This can cause the gRPC payload size to exceed the limit.

Possible solutions

The thread inside an async def Python function is blocked

According to the Python SDK Documentation ⚠️ WARNING: Do not block the thread in async def Python functions. This can stop the processing of the rest of the Temporal.

Blocking the thread can significantly delay execution, potentially leading to a WorkflowTaskTimeout.

Possible solutions
Code
  • This example demonstrate how blocking the thread causes the issue.

Memory Leak

If you are seeing a memory leak, then make sure you are passing through your modules into the workflow sandbox (docs).

  1. Separate your activity code and your workflow code into different files.
  2. In the workflow file, pass through the third party modules and your personal modules (including activity code) that don't have side effects upon import.