Created
October 8, 2020 19:32
-
-
Save nirev/230c616f01b86d3ad9b871af41695526 to your computer and use it in GitHub Desktop.
Configuring Erlang inet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -- ERLANG INET CONFIGURATION FILE -- | |
%% https://erlang.org/doc/apps/erts/inet_cfg.html | |
%% use it by setting the following envvar: | |
%% export ERL_INETRC="/path/to/this-file" | |
%% | |
%% read and monitor nameserver config from here | |
{resolv_conf, "/etc/resolv.conf"}. | |
%% increase cache size | |
{cache_size, 2000}. | |
%% specify lookup method | |
{lookup, [dns, native, file]}. | |
%% how often (in milliseconds) the resolver cache for inet_res(3) is refreshed (expired DNS records are deleted). Defaults to 1 hour. | |
%% set to 10 minutes = 1000 * 60 * 10 = 600_000 | |
{cache_refresh, 600000}. | |
%% time to wait until retry (in milliseconds) for DNS queries made by inet_res | |
{timeout, 500}. | |
%% number of DNS queries inet_res will try before giving up | |
{retry, 3}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment