diff --git a/src/lms/main.cpp b/src/lms/main.cpp index c75b9cc1..202b71d7 100644 --- a/src/lms/main.cpp +++ b/src/lms/main.cpp @@ -77,7 +77,8 @@ generateWtConfig(std::string execPath) args.push_back("--accesslog=" + wtAccessLogFilePath.string()); { - const unsigned long httpServerThreadCount {configHttpServerThreadCount ? configHttpServerThreadCount : std::max(1, std::thread::hardware_concurrency())}; + // Reserve at least 2 threads since we still have some blocking IO (for example when reading from ffmpeg) + const unsigned long httpServerThreadCount {configHttpServerThreadCount ? configHttpServerThreadCount : std::max(2, std::thread::hardware_concurrency())}; args.push_back("--threads=" + std::to_string(httpServerThreadCount)); }