Expected Behavior
The SQLite plugin should respect config.SQL.MaxConns and config.SQL.MaxIdleConns, consistent with the
MySQL and PostgreSQL plugins. When WAL mode is enabled via ConnectAttributes, users should be able to
configure multiple connections for improved throughput.
Actual Behavior
The SQLite plugin hardcodes db.SetMaxOpenConns(1) and db.SetMaxIdleConns(1), ignoring the config
fields. All Temporal services (frontend, history, matching, worker) serialize through a single
connection. At ~1000 concurrent workflows, internal operations (queue processor polls, session
heartbeats, workflow creation) exceed the 5-second ShardIOTimeout and fail with context deadline
exceeded.
Steps to Reproduce the Problem
- Start an embedded Temporal server with SQLite persistence (file mode, WAL enabled via
ConnectAttributes)
- Set config.SQL.MaxConns = 4 in the persistence config
- Submit 1000+ workflows that use sessions (MaxConcurrentSessionExecutionSize: 50)
- Observe context deadline exceeded errors as operations queue behind the single connection. The
MaxConns config value is silently ignored.
##Specifications
- Version: v1.30.0 (also confirmed unchanged in v1.30.2)
- Platform: All (SQLite plugin code is platform-independent)
Expected Behavior
The SQLite plugin should respect config.SQL.MaxConns and config.SQL.MaxIdleConns, consistent with the
MySQL and PostgreSQL plugins. When WAL mode is enabled via ConnectAttributes, users should be able to
configure multiple connections for improved throughput.
Actual Behavior
The SQLite plugin hardcodes db.SetMaxOpenConns(1) and db.SetMaxIdleConns(1), ignoring the config
fields. All Temporal services (frontend, history, matching, worker) serialize through a single
connection. At ~1000 concurrent workflows, internal operations (queue processor polls, session
heartbeats, workflow creation) exceed the 5-second ShardIOTimeout and fail with context deadline
exceeded.
Steps to Reproduce the Problem
ConnectAttributes)
MaxConns config value is silently ignored.
##Specifications