Skip to content

Increase the SQLite row limit to 4 MiB - #7020

Open
joshthoward wants to merge 1 commit into
mainfrom
jhoward/increase-sqlite-row-limit
Open

Increase the SQLite row limit to 4 MiB#7020
joshthoward wants to merge 1 commit into
mainfrom
jhoward/increase-sqlite-row-limit

Conversation

@joshthoward

Copy link
Copy Markdown
Contributor

No description provided.

@ask-bonk

ask-bonk Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

APIError: Invalid Anthropic API Key

github run

2 similar comments
@ask-bonk

ask-bonk Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

@joshthoward Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

Comment on lines -1375 to +1374
// This limit is set higher than what is suggested on sqlite.org/security.html
// because we want to allow storing values of 1MiB, and we added some extra
// padding on top of that
sqlite3_limit(db, SQLITE_LIMIT_LENGTH, 2200000);
// We use most of the suggested limits from sqlite.org/security.html. Note that sqlite3_limit()
// does NOT return an error code; it returns the old limit.
sqlite3_limit(db, SQLITE_LIMIT_LENGTH, 4 * 1024 * 1024);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously we allowed 10% over our documented limit for padding. I have no idea what padding we're accounting for. In the KV interface, we cared about V8 serialization overheads, but we don't use V8 serialization with SQLite. SQLite itself might have padding that I don't know about it.

I guess we will need to update our documentation to say that it's 4 MB, inclusive of any padding the system may add under the covers? That seems less satisfying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants