Skip to content

Commit

Permalink
Patch pool size limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
timrc-git committed Jan 15, 2016
1 parent 1fcaf52 commit 721c849
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/mdbm_handle_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ int mdbm_pool_parse_pool_size(const char *value) {
void mdbm_pool_verify_pool_size(int *vals, int count) {
int i;
int bCheck = 0;
rlim_t current_size;
rlim_t current_size, proc_limit, file_limit;
struct rlimit open_files_limit = {0,0};
struct rlimit processes_or_threads_limit = {0,0};

Expand Down Expand Up @@ -541,9 +541,9 @@ void mdbm_pool_verify_pool_size(int *vals, int count) {
}

/* Each handle uses 2 fd's: the DB and the lockfile. */
rlim_t file_limit = open_files_limit.rlim_cur / 2;
file_limit = open_files_limit.rlim_cur / 2;
/* Arbitrary overhead allowance of three-quarters. */
rlim_t proc_limit = processes_or_threads_limit.rlim_cur * 3 / 4;
proc_limit = processes_or_threads_limit.rlim_cur * 3 / 4;

/* reset the max size to be 3/4 of the configured system max */

Expand Down

0 comments on commit 721c849

Please sign in to comment.