lancedb/lancedb · warning · DeprecationWarning
read_timeout is deprecated and will be removed in a future…
Error message
read_timeout is deprecated and will be removed in a future release. Please use client_config.timeout_config.read_timeout instead.
What it means
LanceDB's remote DB connection warns that the `read_timeout` constructor parameter is deprecated and will be removed. It still applies the value to `client_config.timeout_config.read_timeout`, so behavior is unchanged, but callers must move to the ClientConfig API before the parameter is removed.
Solutions
- Remove `read_timeout=N` from the connect() call.
- Pass a ClientConfig instead: `client_config=ClientConfig(timeout_config=TimeoutConfig(read_timeout=timedelta(seconds=N)))`.
- Suppress the DeprecationWarning only as a temporary measure while migrating.
Example fix
// before
import lancedb
db = lancedb.connect('db://...', read_timeout=30)
// after
from datetime import timedelta
from lancedb.remote import ClientConfig
from lancedb import TimeoutConfig
db = lancedb.connect('db://...', client_config=ClientConfig(timeout_config=TimeoutConfig(read_timeout=timedelta(seconds=30)))) Defensive patterns
Strategy: validation
Validate before calling
import warnings
if kwargs.get('read_timeout') is not None:
warnings.warn('read_timeout is deprecated; use client_config.timeout_config.read_timeout', DeprecationWarning) Try / catch
import warnings
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=DeprecationWarning, message='read_timeout is deprecated') Prevention
- Configure all HTTP timeouts through ClientConfig/TimeoutConfig in new code.
- Grep for `read_timeout=` in connect() calls during lancedb upgrades.
- Run tests with -W error::DeprecationWarning to surface deprecated kwargs early.
When it happens
Trigger: Calling `lancedb.connect(uri, ..., read_timeout=N)` on RemoteDBConnection (python/python/lancedb/remote/db.py __init__) with a non-None read_timeout while the deprecation shim is still in place.
Common situations: Upgrading lancedb in code that configured HTTP timeouts via the old keyword arguments; following older documentation or tutorials for LanceDB Cloud connection setup.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- index_cache_size is deprecated. Use session-level cache…
- setting data_storage_version directly on create_table is…
- setting enable_v2_manifest_paths directly on create_table…
- a Function environment is pip or conda, not both
- blocks_per_epoch='auto' uses an approximate token-count…
AI-assisted analysis of lancedb/lancedb@c7b051aff7 (2026-09-08).
Data as JSON: /api/errors/c6f81c65d270c1e7.
Report an issue: GitHub.
Appendix: source
Thrown at python/python/lancedb/remote/db.py:153
"a future release.",
DeprecationWarning,
stacklevel=2,
)
if connection_timeout is not None:
warnings.warn(
"connection_timeout is deprecated and will be removed in a future "
"release. Please use client_config.timeout_config.connect_timeout "
"instead.",
DeprecationWarning,
stacklevel=2,
)
client_config.timeout_config.connect_timeout = timedelta(
seconds=connection_timeout
)
if read_timeout is not None:
warnings.warn(
"read_timeout is deprecated and will be removed in a future release. "
"Please use client_config.timeout_config.read_timeout instead.",
DeprecationWarning,
stacklevel=2,
)
client_config.timeout_config.read_timeout = timedelta(seconds=read_timeout)
parsed = urlparse(db_url)
if parsed.scheme != "db":
raise ValueError(f"Invalid scheme: {parsed.scheme}, only accepts db://")
self.db_url = db_url
self.api_key = api_key
self.region = region
self.host_override = host_override
self.sql_host_override = sql_host_override
self.storage_options = storage_options
self.db_name = parsed.netloc
View on GitHub (pinned to c7b051aff7)