Langgraph postgress and redis issue #5164
cmanohar25
started this conversation in
Discussions
Replies: 1 comment
-
Sounds like a coredis dep problem. Are you still running into issues? https://coredis.readthedocs.io/en/stable/release_notes.html#v4-4-0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
2025-06-23T06:44:17.566880Z [error ] Background worker scheduler failed [langgraph_runtime_postgres.queue] api_revision=35db578 api_variant=licensed langgraph_api_version=0.2.61 thread_name=MainThread
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/langgraph_runtime_postgres/queue.py", line 236, in queue
File "/usr/local/lib/python3.11/site-packages/langgraph_runtime_postgres/ops.py", line 1522, in next
File "/usr/local/lib/python3.11/site-packages/coredis/commands/_validators.py", line 145, in wrapped
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/commands/_wrappers.py", line 206, in wrapped
async with command_cache(callable, *args, **kwargs) as response:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/commands/_wrappers.py", line 103, in call
yield await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/commands/core.py", line 3249, in blpop
return await self.execute_command(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/client/cluster.py", line 759, in execute_command
return await self.retry_policy.call_with_retries(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/retry.py", line 55, in call_with_retries
return await func()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/client/cluster.py", line 808, in _execute_command
return await self._execute_command_on_single_node(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/client/cluster.py", line 890, in _execute_command_on_single_node
r = await self.connection_pool.get_connection_by_node(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/pool/cluster.py", line 404, in get_connection_by_node
connection = self._make_node_connection(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/coredis/pool/cluster.py", line 260, in _make_node_connection
connection = self.connection_class(
^^^^^^^^^^^^^^^^^^^^^^
TypeError: Connection.init() got an unexpected keyword argument 'read_from_replicas'
Dependencies
requires-python = ">=3.9"
dependencies = [
"langgraph",
"langgraph-checkpoint-postgres",
"langgraph-checkpoint-redis",
# Optional (for selecting different models)
"langchain-anthropic",
"langchain",
"python-dotenv",
"langgraph-sdk",
"trustcall",
"ibm-watsonx-ai",
"python-dotenv",
"langchain-openai",
"bs4",
"pypdf",
"python_multipart",
"psycopg2",
"pgvector",
"boto3",
"langchain-aws",
"langchain-ibm",
"langchain-openai",
"aioboto3"
]
[project.optional-dependencies]
dev = ["mypy>=1.11.1", "ruff>=0.6.1", "pytest-asyncio"]
[build-system]
requires = ["setuptools>=73.0.0", "wheel"]
build-backend = "setuptools.build_meta"
DockerFile
FROM langchain/langgraph-api:3.13
-- Adding local package . --
ADD . /deps/memory-service
-- End of local package . --
-- Installing all local dependencies --
RUN apt-get update && apt-get install -y libpq-dev gcc
RUN pip install --upgrade pip setuptools wheel
-- Installing all local dependencies --
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
-- End of local dependencies install --
ENV LANGGRAPH_STORE='{"index": {"dims": 1536, "embed": "openai:text-embedding-3-small"}}'
ENV LANGSERVE_GRAPHS='{"chatbot": "/deps/memory-service/src/chatbot/graph_watsonx_image.py:graph", "memory_graph": "/deps/memory-service/src/memory_graph/graph.py:graph", "agentic_graph": "/deps/memory-service/src/graph_flow_factory/agentic_graph.py:graph", "image_reco_graph": "/deps/memory-service/src/graph_flow_factory/image_reco_graph.py:graph"}'
-- Ensure user deps didn't inadvertently overwrite langgraph-api
RUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license && touch /api/langgraph_api/init.py /api/langgraph_runtime/init.py /api/langgraph_license/init.py
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir --no-deps -e /api
-- End of ensuring user deps didn't inadvertently overwrite langgraph-api --
WORKDIR /deps/memory-service
Please help me to solve the above error @eric-langchain @langchain-infra
Beta Was this translation helpful? Give feedback.
All reactions