From 56df7461330b1d193f3f60274525eb1b128315ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 30 Apr 2011 16:53:43 -0700 Subject: XXX DEBUGGING! --- OpenSim/Framework/WebUtil.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/WebUtil.cs') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 9d70f63..5449a6f 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -177,7 +177,16 @@ namespace OpenSim.Framework // If there is some input, write it into the request if (data != null) { - string strBuffer = OSDParser.SerializeJsonString(data); + string strBuffer = string.Empty; + try + { + strBuffer = OSDParser.SerializeJsonString(data); + } + catch (Exception e) + { + m_log.DebugFormat("[WEB UTIL]: Exception serializing data {0}", e.Message); + throw e; + } byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); request.ContentType = "application/json"; -- cgit v1.1 From 91a604d4b6822130871f35ddbc2c53f3468c2a01 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 30 Apr 2011 17:40:21 -0700 Subject: Removed XXX Debug. Increased ReadWriteTimeout on ServiceOSDRequest, because it was _way_ too low and is probably making writes abort in the middle. --- OpenSim/Framework/WebUtil.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework/WebUtil.cs') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 5449a6f..f6fed33 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -171,24 +171,15 @@ namespace OpenSim.Framework request.Timeout = timeout; request.KeepAlive = false; request.MaximumAutomaticRedirections = 10; - request.ReadWriteTimeout = timeout / 4; + request.ReadWriteTimeout = timeout * 8; request.Headers[OSHeaderRequestID] = reqnum.ToString(); // If there is some input, write it into the request if (data != null) { - string strBuffer = string.Empty; - try - { - strBuffer = OSDParser.SerializeJsonString(data); - } - catch (Exception e) - { - m_log.DebugFormat("[WEB UTIL]: Exception serializing data {0}", e.Message); - throw e; - } + string strBuffer = OSDParser.SerializeJsonString(data); byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); - + request.ContentType = "application/json"; request.ContentLength = buffer.Length; //Count bytes to send using (Stream requestStream = request.GetRequestStream()) -- cgit v1.1 From d4323dd7530734ed2c35138722ed8c9c01d53d4e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 30 Apr 2011 18:08:48 -0700 Subject: Increased Timeout to 30 secs. --- OpenSim/Framework/WebUtil.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/WebUtil.cs') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index f6fed33..ac0828b 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -142,17 +142,17 @@ namespace OpenSim.Framework /// public static OSDMap PutToService(string url, OSDMap data) { - return ServiceOSDRequest(url,data,"PUT",10000); + return ServiceOSDRequest(url,data,"PUT",30000); } public static OSDMap PostToService(string url, OSDMap data) { - return ServiceOSDRequest(url,data,"POST",10000); + return ServiceOSDRequest(url,data,"POST",30000); } public static OSDMap GetFromService(string url) { - return ServiceOSDRequest(url,null,"GET",10000); + return ServiceOSDRequest(url,null,"GET",30000); } public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) -- cgit v1.1