Skip to content

Commit

Permalink
Add option to specify queue processing timeout
Browse files Browse the repository at this point in the history
Summary: When we have many requests coming in at the same time, some of them end up timing out. This ends up causing reconnects which are not desireable. Adding ability to tune this param, but for now defaulting to 100 since thats the current default.

Reviewed By: shri-khare

Differential Revision: D61296727

fbshipit-source-id: ef63cc8f1838b3b977c7a86c47300d623bcc32da
  • Loading branch information
Peyman Gardideh authored and facebook-github-bot committed Aug 15, 2024
1 parent 53de251 commit 4206c60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fboss/fsdb/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ DEFINE_bool(
false,
"Convert subscriber paths to id paths and serve only ids");

DEFINE_int32(
fsdb_queue_timeout_ms,
100,
"Queue timeout for fsdb thrift server");

namespace facebook::fboss::fsdb {

static apache::thrift::SSLPolicy getThriftServerSSLPolicy() {
Expand Down Expand Up @@ -134,6 +139,8 @@ std::shared_ptr<apache::thrift::ThriftServer> createThriftServer(
server->setQuickExitOnShutdownTimeout(true);
server->setTosReflect(FLAGS_enable_tos_reflect);
server->setSSLPolicy(getThriftServerSSLPolicy());
server->setQueueTimeout(
std::chrono::milliseconds(FLAGS_fsdb_queue_timeout_ms));
if (FLAGS_enable_thrift_acceptor) {
auto trustedSubnets =
getTrustedSubnets(fsdbConfig->getThrift().get_trustedSubnets());
Expand Down

0 comments on commit 4206c60

Please sign in to comment.