Skip to content

[BUG] Neptune create_config raises TypeError when read_timeout is passed #361

Description

@marora90

Package version

3.18.5

Package

lexical-graph

Python version

3.12.0

Operating System

Linux

Description

Passing a custom read_timeout to a Neptune graph store via its config raises a TypeError, so there's no supported way to shorten (or lengthen) the botocore client's read timeout from the public API. This matters when running behind a strict request-timeout (e.g. an API Gateway / load-balancer idle ceiling), where the library's 600s default read timeout is far longer than the surrounding budget and a half-open pooled socket blocks instead of failing fast.

Steps to reproduce

from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory

graph_store = GraphStoreFactory.for_graph_store(
    'neptune-db://my-cluster.cluster-xxxx.us-east-1.neptune.amazonaws.com',
    config='{"read_timeout": 5}',
)
graph_store.execute_query('MATCH (n) RETURN n LIMIT 1')  # client is built lazily here

Minimal equivalent (the failing call inside create_config):

from botocore.config import Config
Config(read_timeout=600, **{"read_timeout": 5})

Error output / stack trace

Traceback (most recent call last):
  File "<repro>", line 7, in <module>
    create_config(json.dumps({"read_timeout": 5}))
  File ".../storage/graph/neptune_graph_stores.py", line 149, in create_config
    return Config(
           ^^^^^^^
TypeError: botocore.config.Config() got multiple values for keyword argument 'read_timeout'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions