The memcached project use environment variables to tune the behaviour of the system (both for test programs and in production).
This document tries to list all the environment variables in use, and what they're used for.
This is a floating point and may be used to configure how often
malloc()
/ realloc()
should return NULL.
This setting is only used if the BadMalloc
allocator hook is enabled.
This is an unsigned integer used to allow the first N calls to
malloc()
/ realloc()
to succeed.
This setting is only used if the BadMalloc
allocator hook is enabled.
This is an unsigned integer used to specify a fixed seed for the random number generator which controls when to fail.
This setting is only used if the BadMalloc
allocator hook is enabled.
The CBAUTH_SOCKPATH
is used to tell cbsasl
the location of saslauthd
to allow external authentication.
CBSASL_PWFILE
is used to tell cbsasl
the location of the password
database in JSON format.
This variable is used by a unit test to have the config library simulate a memory allocation failure.
This variable is used by a unit test to have the config library simulate a failure reading stuff from disk.
This variable should contain a JSON description of some secrets which may be used in order to decrypt the CBSASL files. The JSON looks like:
{
"cipher" : "the cipher to use",
"key" : "base64 encoded key",
"iv" : "base64 encoded iv"
}
May be used to enable support for extended attributes even if the configuration file provided to memcached lists it as disabled.
By setting this environment variable all privilege checks returns success. This mode should NEVER EVER be used in production, and is only intended as a tool to be used during development of the correct roles. By enabling this you may start an application without any privileges, and then look in the logs to see which privileges it would need in order to perform the action successfully.
Some of the command line tools will generate a packet dump if this variable is set.
Specify the list of ciphers allowed.
If set to a non-null value we don't limit the SASL mechanisms to use over SSL to PLAIN
ISASL_PWFILE
is used to tell cbsasl
the location of the password
database in the old (deprecated) format.
Variable set to identify that we're running the crash test (and allows) loading of the crash engine.
The number of CPU's to use for frontend threads.
The NUMA memory to use.
If set it should contain the process identifier of a process to monitor
the existence of. If that process dies, memcached
should die.
If set, memcached writes the port number to all of the ports it binds to during startup. This allows for memcached to start without a single known port.
Should be set to the number of "top keys" memcached should collect information about
Set to indicate that we're running unit tests
Set to indicate that we're running under valgrind
Used to fake a memory allocation in "default_bucket" (should not be used)
Used to tell "default_bucket" to preallocate memory (should not be used)
May be used to tell engine_testapp
to retry failed tests.
May be set to let engine_testapp
use colors in its output.
If set the logger will only sleep 1 sec before dumping internal buffers to the logfile
If set the logger will use 1GB file sizes
If set the logger will use 8MB internal buffers
By setting this variable testapp dumps data sent/received in the old-style tests in the following format:
PLAIN> 0x80, 0xfd, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, ...
PLAIN< 0x81, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ...