Navigation Menu

Skip to content

Commit

Permalink
Log details about vm.overcommit_memory
Browse files Browse the repository at this point in the history
But it never be showen because we can't change the default log level
before grn_init(). :<
  • Loading branch information
kou committed Aug 9, 2012
1 parent 8e426b4 commit 02f176b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/ctx.c
Expand Up @@ -776,16 +776,18 @@ check_overcommit_memory(grn_ctx *ctx)
value = fgetc(file);
if (value != '1') {
GRN_LOG(ctx, GRN_LOG_NOTICE,
"vm.overcommit_memory kernel parameter should be 1: <%c>", value);
GRN_LOG(ctx, GRN_LOG_NOTICE,
"vm.overcommit_memory kernel parameter should be 1: <%c>: "
"See INFO level log to resolve this",
value);
GRN_LOG(ctx, GRN_LOG_INFO,
"Some processings with vm.overcommit_memory != 1 "
"may break DB under low memory condition.");
GRN_LOG(ctx, GRN_LOG_NOTICE,
GRN_LOG(ctx, GRN_LOG_INFO,
"To set vm.overcommit_memory to 1");
GRN_LOG(ctx, GRN_LOG_NOTICE,
GRN_LOG(ctx, GRN_LOG_INFO,
"add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and "
"restart your system or");
GRN_LOG(ctx, GRN_LOG_NOTICE,
GRN_LOG(ctx, GRN_LOG_INFO,
"run 'sudo /sbin/sysctl vm.overcommit_memory=1' command.");
}
fclose(file);
Expand Down

0 comments on commit 02f176b

Please sign in to comment.