• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1gRPC environment variables
2--------------------------
3
4gRPC C core based implementations (those contained in this repository) expose
5some configuration as environment variables that can be set.
6
7* grpc_proxy, https_proxy, http_proxy
8  The URI of the proxy to use for HTTP CONNECT support. These variables are
9  checked in order, and the first one that has a value is used.
10
11* no_grpc_proxy, no_proxy
12  A comma separated list of hostnames to connect to without using a proxy even
13  if a proxy is set. These variables are checked in order, and the first one
14  that has a value is used.
15
16* GRPC_ABORT_ON_LEAKS
17  A debugging aid to cause a call to abort() when gRPC objects are leaked past
18  grpc_shutdown(). Set to 1 to cause the abort, if unset or 0 it does not
19  abort the process.
20
21* GOOGLE_APPLICATION_CREDENTIALS
22  The path to find the credentials to use when Google credentials are created
23
24* GRPC_SSL_CIPHER_SUITES
25  A colon separated list of cipher suites to use with OpenSSL
26  Defaults to:
27    ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384
28
29* GRPC_DEFAULT_SSL_ROOTS_FILE_PATH
30  PEM file to load SSL roots from
31
32* GRPC_POLL_STRATEGY [posix-style environments only]
33  Declares which polling engines to try when starting gRPC.
34  This is a comma-separated list of engines, which are tried in priority order
35  first -> last.
36  Available polling engines include:
37  - epoll (linux-only) - a polling engine based around the epoll family of
38    system calls
39  - poll - a portable polling engine based around poll(), intended to be a
40    fallback engine when nothing better exists
41  - legacy - the (deprecated) original polling engine for gRPC
42
43* GRPC_TRACE
44  A comma-separated list of tracer names or glob patterns that provide
45  additional insight into how gRPC C core is processing requests via debug logs.
46  Available tracers and their usage can be found in
47  [gRPC Trace Flags](trace_flags.md)
48
49* GRPC_VERBOSITY (DEPRECATED)
50
51<!-- BEGIN_OPEN_SOURCE_DOCUMENTATION -->
52  `GRPC_VERBOSITY` is used to set the minimum level of log messages printed. Supported values are `DEBUG`, `INFO`, `ERROR` and `NONE`.
53
54  We only support this flag for legacy reasons. If this environment variable is set, then gRPC will set absl MinLogValue and absl SetVLogLevel. This will alter the log settings of the entire application, not just gRPC code. For that reason, it is not recommended. Our recommendation is to avoid using this flag and [set log verbosity using absl](https://abseil.io/docs/cpp/guides/logging).
55
56  gRPC logging verbosity - one of:
57  - DEBUG - log INFO, WARNING, ERROR and FATAL messages. Also sets absl VLOG(2) logs enabled. This is not recommended for production systems. This will be expensive for staging environments too, so it can be used when you want to debug a specific issue.
58  - INFO - log INFO, WARNING, ERROR and FATAL messages. This is not recommended for production systems. This may be slightly expensive for staging environments too. We recommend that you use your discretion for staging environments.
59  - ERROR - log ERROR and FATAL messages. This is recommended for production systems.
60  - NONE - won't log any.
61  GRPC_VERBOSITY will set verbosity of absl logging.
62  - If the external application sets some other verbosity, then whatever is set later will be honoured.
63  - If nothing is set as GRPC_VERBOSITY, then the setting of the external application will be honoured.
64  - If nothing is set by the external application also, the default set by absl will be honoured.
65<!-- END_OPEN_SOURCE_DOCUMENTATION -->
66
67* GRPC_STACKTRACE_MINLOGLEVEL (DEPRECATED)
68  This will not work anymore.
69
70* GRPC_TRACE_FUZZER
71  if set, the fuzzers will output trace (it is usually suppressed).
72
73* GRPC_DNS_RESOLVER
74  Declares which DNS resolver to use. The default is ares if gRPC is built with
75  c-ares support. Otherwise, the value of this environment variable is ignored.
76  Available DNS resolver include:
77  - ares (default on most platforms except iOS, Android or Node)- a DNS
78    resolver based around the c-ares library
79  - native - a DNS resolver based around getaddrinfo(), creates a new thread to
80    perform name resolution
81
82  *NetBIOS and DNS*: If your network relies on NetBIOS name resolution or a mixture of
83  DNS and NetBIOS name resolution (e.g. in some Windows networks) then you should use
84  the '*native*' DNS resolver or make sure all NetBIOS names are
85  also configured in DNS. The '*ares*' DNS resolver only supports DNS name resolution.
86
87* GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS
88  Default: 5000
89  Declares the interval between two backup polls on client channels. These polls
90  are run in the timer thread so that gRPC can process connection failures while
91  there is no active polling thread. They help reconnect disconnected client
92  channels (mostly due to idleness), so that the next RPC on this channel won't
93  fail. Set to 0 to turn off the backup polls.
94
95* grpc_cfstream
96  set to 1 to turn on CFStream experiment. With this experiment gRPC uses CFStream API to make TCP
97  connections. The option is only available on iOS platform and when macro GRPC_CFSTREAM is defined.
98