We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e9ba336 + 1cce32e commit 78250a7Copy full SHA for 78250a7
src/db/mod.rs
@@ -120,7 +120,11 @@ impl Database {
120
121
fn new(conn: SqliteConnectionManager, tempfile: Option<NamedTempFile>) -> Fallible<Self> {
122
let pool = Pool::builder()
123
- .connection_timeout(Duration::from_secs(5))
+ // By inspection we have 13 threads in production, so make sure each of them can get a
124
+ // connection. In practice some of those wouldn't acquire database connections (e.g.,
125
+ // the ctrl-c thread) but this seems like a good idea regardless.
126
+ .max_size(20)
127
+ .connection_timeout(Duration::from_secs(30))
128
.error_handler(Box::new(ErrorHandler))
129
.build(conn)?;
130
0 commit comments