Cancelled error with langgraph runs #1601
-
I have an inconsistent issue as CancelledError().
and
The below is the error trace: |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 6 replies
-
I get the same error when execution time reaches about 60s |
Beta Was this translation helpful? Give feedback.
-
Hi @kedarsp-informa you shouldn't use |
Beta Was this translation helpful? Give feedback.
-
I get the same error when attempting to run a subprocess to install a linter on startup. I am using langgraph cloud. Unsure about what "shouldn't use asyncio.run in add_node" means. this is a very simple graph, which also successfully runs my subprocess to install a linter, but fails afterwards. Deploys successfully without this line: subprocess.run(["bash", "build_linter.sh"], check=True) Registering graph with id 'agent' During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
-
@nfcampos I have this issue too - wrote to support and shared traces. In my case there are no asyncio.run calls - only asyncio.gather (but that one has to be for parallelisation). The rest is async/await. |
Beta Was this translation helpful? Give feedback.
-
Could this issue be related to having no listeners on the stream (as the run it purely a background one)? It seems to occur only under those circumstances on LangGraph Cloud. |
Beta Was this translation helpful? Give feedback.
-
We are also facing this and are not doing any asyncio.run in nodes. Its getting a timeout from redis which is caused by cancelled error
|
Beta Was this translation helpful? Give feedback.
Hi @kedarsp-informa you shouldn't use
asyncio.run
inadd_node
we have native support for async functions in nodes. Usingasyncio.run
would create a new event loop for each node, which is very inefficient and can cause issues such as cancellation not propagating from graph to node etc