aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsskvor <sskvor@yandex-team.com>2023-03-14 23:23:14 +0300
committersskvor <sskvor@yandex-team.com>2023-03-14 23:23:14 +0300
commit870e6e6108a92143ce551f4b924da26de4803358 (patch)
tree77ffa32366c8176c5a31790cd0d3be2804effe58
parent196d0bbc0be43b25d76ce2902da9fa13ee0c9ae0 (diff)
downloadydb-870e6e6108a92143ce551f4b924da26de4803358.tar.gz
[http/server] Add epoll max events option
-rw-r--r--library/cpp/http/server/http.cpp2
-rw-r--r--library/cpp/http/server/options.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp
index c2ca947d50..2dd407dcef 100644
--- a/library/cpp/http/server/http.cpp
+++ b/library/cpp/http/server/http.cpp
@@ -341,7 +341,7 @@ public:
ListenStartEvent.Signal();
TVector<void*> events;
- events.resize(1);
+ events.resize(Options_.EpollMaxEvents);
TInstant now = TInstant::Now();
for (;;) {
diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h
index 38eda0e5e7..5976d58f32 100644
--- a/library/cpp/http/server/options.h
+++ b/library/cpp/http/server/options.h
@@ -161,6 +161,7 @@ public:
ui32 MaxFQueueSize = 0;
ui32 MaxConnections = 100;
int ListenBacklog = SOMAXCONN;
+ ui32 EpollMaxEvents = 1;
TDuration ClientTimeout;
size_t OutputBufferSize = 0;
ui64 MaxInputContentLength = sizeof(size_t) <= 4 ? 2_GB : 64_GB;