moonchen commented on code in PR #12524:
URL: https://github.com/apache/trafficserver/pull/12524#discussion_r2504674255
##########
src/traffic_server/traffic_server.cc:
##########
@@ -2131,6 +2137,14 @@ main(int /* argc ATS_UNUSED */, const char **argv)
RecRegisterConfigUpdateCb("proxy.config.dump_mem_info_frequency",
init_memory_tracker, nullptr);
init_memory_tracker(nullptr, RECD_NULL, RecData(), nullptr);
+ // Start the watchdog
+ int watchdog_timeout_ms =
RecGetRecordInt("proxy.config.exec_thread.watchdog.timeout_ms").value_or(1000);
+ if (watchdog_timeout_ms > 0) {
+ watchdog =
std::make_unique<Watchdog::Monitor>(eventProcessor.thread_group[ET_NET]._thread,
+
static_cast<size_t>(eventProcessor.thread_group[ET_NET]._count),
+
std::chrono::milliseconds{watchdog_timeout_ms});
Review Comment:
The sentinel values are chosen this way to tolerate delays in the startup of
ET_NET threads. See this code in watchdog.cc:
```
if (last_sleep == std::chrono::steady_clock::time_point::min()) {
// initial value sentinel - event loop hasn't started
continue;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]