changeset 3842:bdbe12aba99f

reducing the default number of threads in the HTTP server from 50 to 10
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 Apr 2020 17:03:34 +0200
parents be7df7fe3d80
children 138d0dde41b5
files NEWS OrthancServer/main.cpp Resources/Configuration.json
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Apr 16 16:58:37 2020 +0200
+++ b/NEWS	Thu Apr 16 17:03:34 2020 +0200
@@ -21,6 +21,7 @@
 * Error reporting on failure while initializing SSL
 * Fix unit test ParsedDicomFile.ToJsonFlags2 on big-endian architectures
 * Avoid one memcpy of the DICOM buffer on "POST /instances"
+* Default value of "HttpThreadsCount" reduced from 50 to 10
 * Upgraded dependencies for static builds (notably on Windows):
   - civetweb 1.12
   - openssl 1.1.1f
--- a/OrthancServer/main.cpp	Thu Apr 16 16:58:37 2020 +0200
+++ b/OrthancServer/main.cpp	Thu Apr 16 17:03:34 2020 +0200
@@ -906,7 +906,7 @@
       httpDescribeErrors = lock.GetConfiguration().GetBooleanParameter("HttpDescribeErrors", true);
   
       // HTTP server
-      httpServer.SetThreadsCount(lock.GetConfiguration().GetUnsignedIntegerParameter("HttpThreadsCount", 50));
+      httpServer.SetThreadsCount(lock.GetConfiguration().GetUnsignedIntegerParameter("HttpThreadsCount", 10));
       httpServer.SetPortNumber(lock.GetConfiguration().GetUnsignedIntegerParameter("HttpPort", 8042));
       httpServer.SetRemoteAccessAllowed(lock.GetConfiguration().GetBooleanParameter("RemoteAccessAllowed", false));
       httpServer.SetKeepAliveEnabled(lock.GetConfiguration().GetBooleanParameter("KeepAlive", defaultKeepAlive));
--- a/Resources/Configuration.json	Thu Apr 16 16:58:37 2020 +0200
+++ b/Resources/Configuration.json	Thu Apr 16 17:03:34 2020 +0200
@@ -391,8 +391,11 @@
   // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
   "TcpNoDelay" : true,
 
-  // Number of threads that are used by the embedded HTTP server.
-  "HttpThreadsCount" : 50,
+  // Number of threads that are used by the embedded HTTP server.  In
+  // Orthanc <= 1.6.0, the default value was 50. In Orthanc >= 1.6.1,
+  // default is 10 to prevent memory grow in basic setups.
+  // https://groups.google.com/d/msg/orthanc-users/qWqxpvCPv8g/Z8huoA5FDAAJ
+  "HttpThreadsCount" : 10,
 
   // If this option is set to "false", Orthanc will run in index-only
   // mode. The DICOM files will not be stored on the drive. Note that