aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2019-08-09 12:06:33 +0100
committerMelanie2019-08-09 12:06:33 +0100
commitc9b7ec2af91792b9d6558875c2a44267ac0ac5a0 (patch)
tree872c93bfd92f83b5e03ec35c3297ce5248410f77 /OpenSim/Region
parentMerge branch 'master' of brain.opensimulator.org:/var/git/opensim (diff)
downloadopensim-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.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
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;
37using System.Text; 37using System.Text;
38using System.Text.RegularExpressions; 38using System.Text.RegularExpressions;
39using System.Timers; 39using System.Timers;
40using System.Net;
40using log4net; 41using log4net;
41using NDesk.Options; 42using NDesk.Options;
42using Nini.Config; 43using 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)