-
Notifications
You must be signed in to change notification settings - Fork 30
[BUG] No Database Connection Pooling #161
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingideIssues related to IDEIssues related to IDEinvalidThis doesn't seem rightThis doesn't seem rightvgrep
Description
Project
vgrep
Description
The server creates a new SQLite database connection for every request to /status and /search endpoints. This is inefficient and can cause issues with connection limits and SQLITE_BUSY errors under load.
Error Message
Potential `SQLITE_BUSY` under concurrent requests.Debug Logs
System Information
- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+Screenshots
No response
Steps to Reproduce
- Start server:
vgrep serve - Send many concurrent search requests
- Each request opens a new database connection
- Potential for resource exhaustion or busy errors
Expected Behavior
- Single database connection (or pool) in
ServerState - Connection reused across requests
- Proper connection pooling for concurrent access
Actual Behavior
- New
Databasecreated per request - Connection opened and closed for every request
- File descriptor churn
- Potential SQLITE_BUSY under load
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingideIssues related to IDEIssues related to IDEinvalidThis doesn't seem rightThis doesn't seem rightvgrep