Skip to content

Improve SQLite concurrency and fix AV1 transcoding false positives#397

Merged
ShaneIsrael merged 4 commits intodevelopfrom
copilot/improve-sqlite-performance
Jan 20, 2026
Merged

Improve SQLite concurrency and fix AV1 transcoding false positives#397
ShaneIsrael merged 4 commits intodevelopfrom
copilot/improve-sqlite-performance

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

SQLite lock contention under concurrent requests, plus valid AV1 files incorrectly flagged as corrupt during transcoding.

SQLite Performance

  • Use NullPool - Connection pooling doesn't benefit file-based SQLite and causes stale connection issues
  • Add timeout=30 to connection args for lock wait tolerance
  • Set check_same_thread=False for multi-threaded Flask access (safe with existing WAL mode)
  • Applied same config to APScheduler's SQLAlchemyJobStore
app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {
    'poolclass': NullPool,
    'connect_args': {
        'timeout': 30,
        'check_same_thread': False,
    },
}

AV1 Transcoding

  • Added "invalid data found when processing input" to AV1_FALSE_POSITIVE_INDICATORS
  • This ffmpeg warning occurs with valid AV1 files but wasn't being ignored like other known AV1 false positives
Original prompt

Is there anything that can be done to improve sqlite's performance. It seems like right now that it gets locked up if there are too many requests.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 20, 2026 02:57
Co-authored-by: ShaneIsrael <1677199+ShaneIsrael@users.noreply.github.com>
Co-authored-by: ShaneIsrael <1677199+ShaneIsrael@users.noreply.github.com>
Co-authored-by: ShaneIsrael <1677199+ShaneIsrael@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate performance enhancements for SQLite Improve SQLite concurrency and fix AV1 transcoding false positives Jan 20, 2026
Copilot AI requested a review from ShaneIsrael January 20, 2026 03:02
@ShaneIsrael ShaneIsrael marked this pull request as ready for review January 20, 2026 03:03
@ShaneIsrael ShaneIsrael merged commit 8e09944 into develop Jan 20, 2026
@ShaneIsrael ShaneIsrael deleted the copilot/improve-sqlite-performance branch January 20, 2026 06:16
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.

2 participants