Mercurial > hg > orthanc
changeset 3180:07a2f637b76d
new option: "HttpThreadsCount" to set the number of threads in the embedded HTTP server
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Jan 2019 17:50:51 +0100 |
parents | fca730c267d7 |
children | 6fd38327e777 c6dab987f43a |
files | Core/HttpServer/HttpServer.cpp NEWS OrthancServer/main.cpp Resources/Configuration.json |
diffstat | 4 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/HttpServer/HttpServer.cpp Wed Jan 30 17:12:15 2019 +0100 +++ b/Core/HttpServer/HttpServer.cpp Wed Jan 30 17:50:51 2019 +0100 @@ -1202,6 +1202,8 @@ Stop(); threadsCount_ = threads; + + LOG(INFO) << "The embedded HTTP server will use " << threads << " threads"; }
--- a/NEWS Wed Jan 30 17:12:15 2019 +0100 +++ b/NEWS Wed Jan 30 17:50:51 2019 +0100 @@ -4,7 +4,9 @@ General ------- -* New configuration option: "MetricsEnabled" to track the metrics of Orthanc +* New configuration options: + - "MetricsEnabled" to track the metrics of Orthanc + - "HttpThreadsCount" to set the number of threads in the embedded HTTP server REST API --------
--- a/OrthancServer/main.cpp Wed Jan 30 17:12:15 2019 +0100 +++ b/OrthancServer/main.cpp Wed Jan 30 17:50:51 2019 +0100 @@ -814,7 +814,7 @@ httpDescribeErrors = lock.GetConfiguration().GetBooleanParameter("HttpDescribeErrors", true); // HTTP server - //httpServer.SetThreadsCount(50); + httpServer.SetThreadsCount(lock.GetConfiguration().GetUnsignedIntegerParameter("HttpThreadsCount", 50)); 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 Wed Jan 30 17:12:15 2019 +0100 +++ b/Resources/Configuration.json Wed Jan 30 17:50:51 2019 +0100 @@ -363,6 +363,9 @@ // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay "TcpNoDelay" : true, + // Number of threads that are used by the embedded HTTP server. + "HttpThreadsCount" : 50, + // 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 // this option might prevent the upgrade to newer versions of Orthanc.