diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-05-01 10:32:48 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-05-01 10:32:48 +0100 |
| commit | 1c929e46d8e7b14a74f80a21b5f30c9abbee410f (patch) | |
| tree | 9fa41d54696d91ce523a3830640d949e98f31760 /src/webstat_logger_main.cpp | |
| parent | ada3ab9f84dfa2df733d48d516476203a361ac63 (diff) | |
| download | webstat-1c929e46d8e7b14a74f80a21b5f30c9abbee410f.tar.bz2 webstat-1c929e46d8e7b14a74f80a21b5f30c9abbee410f.tar.xz webstat-1c929e46d8e7b14a74f80a21b5f30c9abbee410f.zip | |
Limit the number lines stored at once
Limits the number lines inserted per transactions, and the number of
transactions before returning to reading input.
Prevents long running transactions in the case when queued lines has
grown in size.
Diffstat (limited to 'src/webstat_logger_main.cpp')
| -rw-r--r-- | src/webstat_logger_main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/webstat_logger_main.cpp b/src/webstat_logger_main.cpp index 3eaa9f0..04d59fc 100644 --- a/src/webstat_logger_main.cpp +++ b/src/webstat_logger_main.cpp @@ -68,7 +68,9 @@ main(int argc, char ** argv) ("db.wr.keep", po::value(&settings.dbKeep)->default_value(settings.dbKeep), "Number of write/read write DB connections to keep open") ("db.maxBatchSize", po::value(&settings.maxBatchSize)->default_value(settings.maxBatchSize), - "Maximum number of access log entries to hold in memory before writing them to the DB") + "Number of access log entries to hold in memory before starting to write them to the DB") + ("db.maxBatches", po::value(&settings.maxBatches)->default_value(settings.maxBatches), + "Maximum number of batches to insert before returning to reading input") ("fallback.dir", po::value(&settings.fallbackDir)->default_value(settings.fallbackDir), "Path to write access logs to when the database is unavailable") ("jobs.check", po::value(&settings.checkJobsAfter)->default_value(settings.checkJobsAfter), |
