diff options
author | Melanie | 2019-08-09 12:06:33 +0100 |
---|---|---|
committer | Melanie | 2019-08-09 12:06:33 +0100 |
commit | c9b7ec2af91792b9d6558875c2a44267ac0ac5a0 (patch) | |
tree | 872c93bfd92f83b5e03ec35c3297ce5248410f77 /OpenSim/Region | |
parent | Merge branch 'master' of brain.opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.zip opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.tar.gz opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.tar.bz2 opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.tar.xz |
Make the DNS cache timeout configurable.
In containerized environments, DNS is simulated. It can change several
times per second as containers move around. The hardcoded timeout was
too long for a container environment.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index e4c3329..7c3b6c5 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim | |||
84 | ServicePointManager.DefaultConnectionLimit = 12; | 84 | ServicePointManager.DefaultConnectionLimit = 12; |
85 | } | 85 | } |
86 | 86 | ||
87 | try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { } | 87 | try { ServicePointManager.DnsRefreshTimeout = 5000; } catch { } |
88 | ServicePointManager.Expect100Continue = false; | 88 | ServicePointManager.Expect100Continue = false; |
89 | ServicePointManager.UseNagleAlgorithm = false; | 89 | ServicePointManager.UseNagleAlgorithm = false; |
90 | 90 | ||
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index fcc8717..ee4ddf4 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -37,6 +37,7 @@ using System.Runtime; | |||
37 | using System.Text; | 37 | using System.Text; |
38 | using System.Text.RegularExpressions; | 38 | using System.Text.RegularExpressions; |
39 | using System.Timers; | 39 | using System.Timers; |
40 | using System.Net; | ||
40 | using log4net; | 41 | using log4net; |
41 | using NDesk.Options; | 42 | using NDesk.Options; |
42 | using Nini.Config; | 43 | using Nini.Config; |
@@ -119,6 +120,9 @@ namespace OpenSim | |||
119 | stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 ); | 120 | stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 ); |
120 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25); | 121 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25); |
121 | m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); | 122 | m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); |
123 | |||
124 | int dnsTimeout = startupConfig.GetInt("DnsTimeout", 30000); | ||
125 | try { ServicePointManager.DnsRefreshTimeout = dnsTimeout; } catch { } | ||
122 | } | 126 | } |
123 | 127 | ||
124 | if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) | 128 | if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) |