aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2011-03-14 12:56:50 +0100
committerMelanie2011-03-14 12:56:50 +0100
commitf54ddd88a2d615a7d577671cd38e66e60994451d (patch)
treee2a93b56a59cf0fcdf960b4e8d8ef9bcdc136496 /OpenSim/Framework
parentChange avatar picker search to work properly when two name parts are used (diff)
downloadopensim-SC-f54ddd88a2d615a7d577671cd38e66e60994451d.zip
opensim-SC-f54ddd88a2d615a7d577671cd38e66e60994451d.tar.gz
opensim-SC-f54ddd88a2d615a7d577671cd38e66e60994451d.tar.bz2
opensim-SC-f54ddd88a2d615a7d577671cd38e66e60994451d.tar.xz
Up the timeout on slow requests to 3000 to stop console spam. Make sure
request method and target are reported correctly and drop the txn id as it's empty 99% of the time.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 1d05b02..953ed85 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -378,6 +378,22 @@ namespace OpenSim.Framework.Servers.HttpServer
378 /// <param name="response"></param> 378 /// <param name="response"></param>
379 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) 379 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
380 { 380 {
381 if (request.HttpMethod == String.Empty) // Can't handle empty requests, not wasting a thread
382 {
383 try
384 {
385 SendHTML500(response);
386 }
387 catch
388 {
389 }
390
391 return;
392 }
393
394 string requestMethod = request.HttpMethod;
395 string uriString = request.RawUrl;
396
381 string reqnum = "unknown"; 397 string reqnum = "unknown";
382 int tickstart = Environment.TickCount; 398 int tickstart = Environment.TickCount;
383 399
@@ -495,7 +511,7 @@ namespace OpenSim.Framework.Servers.HttpServer
495 511
496 request.InputStream.Close(); 512 request.InputStream.Close();
497 513
498 // HTTP IN support. The script engine taes it from here 514 // HTTP IN support. The script engine takes it from here
499 // Nothing to worry about for us. 515 // Nothing to worry about for us.
500 // 516 //
501 if (buffer == null) 517 if (buffer == null)
@@ -609,9 +625,9 @@ namespace OpenSim.Framework.Servers.HttpServer
609 { 625 {
610 m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e); 626 m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e);
611 } 627 }
612 catch (InvalidOperationException e) 628 catch (Exception e)
613 { 629 {
614 m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e); 630 m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw " + e.ToString());
615 SendHTML500(response); 631 SendHTML500(response);
616 } 632 }
617 finally 633 finally
@@ -619,9 +635,9 @@ namespace OpenSim.Framework.Servers.HttpServer
619 // Every month or so this will wrap and give bad numbers, not really a problem 635 // Every month or so this will wrap and give bad numbers, not really a problem
620 // since its just for reporting, 200ms limit can be adjusted 636 // since its just for reporting, 200ms limit can be adjusted
621 int tickdiff = Environment.TickCount - tickstart; 637 int tickdiff = Environment.TickCount - tickstart;
622 if (tickdiff > 500) 638 if (tickdiff > 3000)
623 m_log.InfoFormat( 639 m_log.InfoFormat(
624 "[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff); 640 "[BASE HTTP SERVER]: slow {0} request for {1} from {2} took {3} ms", requestMethod, uriString, request.RemoteIPEndPoint.ToString(), tickdiff);
625 } 641 }
626 } 642 }
627 643