Self Hosted LangGraph server Errors (Google Cloud) #240

Closed
opened 2026-02-15 18:14:55 -05:00 by yindo · 5 comments
Owner

Originally created by @BinariusConsulting on GitHub (Apr 19, 2025).

I have a self hosted version of a very simple graph deployed on Google Cloud run. The docker was cerated using the langgraph cli tools and I have my own postgres and redis instances wroking well and connected. When i call the endpoint of this self hosted version more than 50% of the times i get the below errors. Inadditona there is a warning [WARNING]: LangSmith failed to fetch info on supported operations. Falling back to batch operations and default limits. How can i resolve these errors?

On the other hand, if I use the langgraphjs dev command to run the graph locally in LangGraph Studio, It works without any errors whatsoever.

2025-04-18 23:44:51.927 PDT ^^^^^^^^^
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/stream.py", line 269, in consume
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/stream.py", line 258, in consume
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/stream.py", line 147, in astream_state
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/asyncio.py", line 82, in wait_if_not_done
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/js/remote.py", line 142, in astream_events
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/js/remote.py", line 92, in _client_stream
2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/js/sse.py", line 134, in aiter_lines_raw
2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 997, in aiter_bytes
2025-04-18 23:44:51.927 PDT async for raw_bytes in self.aiter_raw():
2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 1055, in aiter_raw
2025-04-18 23:44:51.927 PDT async for raw_stream_bytes in self.stream:
2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 176, in __aiter__
2025-04-18 23:44:51.927 PDT async for chunk in self._stream:
2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 270, in __aiter__
2025-04-18 23:44:51.927 PDT with map_httpcore_exceptions():
2025-04-18 23:44:51.927 PDT ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
2025-04-18 23:44:51.927 PDT self.gen.throw(value)
2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
2025-04-18 23:44:51.927 PDT raise mapped_exc(message) from exc
2025-04-18 23:44:51.927 PDT httpx.ReadTimeout
Originally created by @BinariusConsulting on GitHub (Apr 19, 2025). I have a self hosted version of a very simple graph deployed on Google Cloud run. The docker was cerated using the langgraph cli tools and I have my own postgres and redis instances wroking well and connected. When i call the endpoint of this self hosted version more than 50% of the times i get the below errors. Inadditona there is a warning [WARNING]: LangSmith failed to fetch info on supported operations. Falling back to batch operations and default limits. How can i resolve these errors? On the other hand, if I use the langgraphjs dev command to run the graph locally in LangGraph Studio, It works without any errors whatsoever. ``` 2025-04-18 23:44:51.927 PDT ^^^^^^^^^ 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/stream.py", line 269, in consume 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/stream.py", line 258, in consume 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/stream.py", line 147, in astream_state 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/asyncio.py", line 82, in wait_if_not_done 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/js/remote.py", line 142, in astream_events 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/js/remote.py", line 92, in _client_stream 2025-04-18 23:44:51.927 PDT File "/api/langgraph_api/js/sse.py", line 134, in aiter_lines_raw 2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 997, in aiter_bytes 2025-04-18 23:44:51.927 PDT async for raw_bytes in self.aiter_raw(): 2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 1055, in aiter_raw 2025-04-18 23:44:51.927 PDT async for raw_stream_bytes in self.stream: 2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 176, in __aiter__ 2025-04-18 23:44:51.927 PDT async for chunk in self._stream: 2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 270, in __aiter__ 2025-04-18 23:44:51.927 PDT with map_httpcore_exceptions(): 2025-04-18 23:44:51.927 PDT ^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__ 2025-04-18 23:44:51.927 PDT self.gen.throw(value) 2025-04-18 23:44:51.927 PDT File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions 2025-04-18 23:44:51.927 PDT raise mapped_exc(message) from exc 2025-04-18 23:44:51.927 PDT httpx.ReadTimeout ```
yindo closed this issue 2026-02-15 18:14:56 -05:00
Author
Owner

@benjamincburns commented on GitHub (Apr 28, 2025):

cc @dqbd

@benjamincburns commented on GitHub (Apr 28, 2025): cc @dqbd
Author
Owner

@benjamincburns commented on GitHub (Apr 28, 2025):

@BinariusConsulting just to clarify, does the same image that fails in GCP run fine when tested locally?

@benjamincburns commented on GitHub (Apr 28, 2025): @BinariusConsulting just to clarify, does the same image that fails in GCP run fine when tested locally?
Author
Owner

@BinariusConsulting commented on GitHub (Apr 28, 2025):

@benjamincburns Hi! I did not thoroughly test the image locally, but I think it worked locally. However, I have not seen the errors from the past three days. My hypothesis is that the errors were being caused by cold starts on Google Cloud Run, so I currently have at least one instance running for my LangGraph server, and that seems to have done the trick. Additionally, I rebuilt the image using the latest LangGraph CLI, so that might also have played a part. I'll let you know if this resurfaces again.

@BinariusConsulting commented on GitHub (Apr 28, 2025): @benjamincburns Hi! I did not thoroughly test the image locally, but I think it worked locally. However, I have not seen the errors from the past three days. My hypothesis is that the errors were being caused by cold starts on Google Cloud Run, so I currently have at least one instance running for my LangGraph server, and that seems to have done the trick. Additionally, I rebuilt the image using the latest LangGraph CLI, so that might also have played a part. I'll let you know if this resurfaces again.
Author
Owner

@benjamincburns commented on GitHub (May 13, 2025):

Transferred to LangGraphJS API project as it's related to CLI & OSS platform tooling

@benjamincburns commented on GitHub (May 13, 2025): Transferred to LangGraphJS API project as it's related to CLI & OSS platform tooling
Author
Owner

@dqbd commented on GitHub (Jul 4, 2025):

Hello! Judging by the stacktrace it does seem like that JS event loop is stuck. We've improved the logging for that scenario in particular. Feel free to reopen the issue if the issue still persists.

@dqbd commented on GitHub (Jul 4, 2025): Hello! Judging by the stacktrace it does seem like that JS event loop is stuck. We've improved the logging for that scenario in particular. Feel free to reopen the issue if the issue still persists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#240