feat(store): make sqlite pool size configurable#2030
Open
N8N411 wants to merge 1 commit into0xMiden:mainfrom
Open
feat(store): make sqlite pool size configurable#2030N8N411 wants to merge 1 commit into0xMiden:mainfrom
N8N411 wants to merge 1 commit into0xMiden:mainfrom
Conversation
Mirko-von-Leipzig
requested changes
May 2, 2026
Collaborator
Mirko-von-Leipzig
left a comment
There was a problem hiding this comment.
As noted in the issue, please target main not next
Contributor
|
This would just merge |
Add a new sqlite pool-size option in shared storage CLI options and thread it through store state initialization so operators can tune database concurrency instead of relying on a hardcoded pool of 16.
c3f9220 to
7d69714
Compare
kkovaacs
reviewed
May 5, 2026
| impl Db { | ||
| /// Creates a new database instance with the provided connection pool. | ||
| pub fn new(database_filepath: &Path) -> Result<Self, DatabaseError> { | ||
| Self::new_with_pool_size(database_filepath, NonZeroUsize::new(16).expect("non-zero")) |
Contributor
There was a problem hiding this comment.
This is somewhat unrelated, but I think the deadpool_diesel default of NUM_CPUS * 2 is a better default for the pool size than our hard-wired 16.
@Mirko-von-Leipzig Maybe we should just use that default instead of 16?
Obviously that'd mean some changes here: unless an explicit value is forced on the CLI we should not call builder.max_size(N) at all.
Collaborator
There was a problem hiding this comment.
Sure that makes sense to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new sqlite pool-size option in shared storage CLI options and thread it through store state initialization so operators can tune database concurrency instead of relying on a hardcoded pool of 16.
Summary
--sqlite.pool_sizeandMIDEN_NODE_SQLITE_POOL_SIZEWhy
Issue #1928 notes that the default fixed pool size can be too low relative to RPC concurrency. This change preserves the current default while allowing operators to tune DB concurrency for their workloads.
Closes #1928