gianm commented on code in PR #15596:
URL: https://github.com/apache/druid/pull/15596#discussion_r1442469567
##########
server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java:
##########
@@ -491,6 +495,18 @@ private static int
getMaxJettyAcceptorsSelectorsNum(DruidNode druidNode)
return numServerConnector * 8;
}
+ private static int getTCPAcceptQueueSize()
+ {
+ try {
+ BufferedReader in =
Files.newBufferedReader(Paths.get("/proc/sys/net/core/somaxconn"));
+ return Integer.parseInt(in.readLine().trim());
+ }
+ catch (Exception e) {
+ log.warn("Unable to read /proc/sys/net/core/somaxconn, falling back to
default value for TCP accept queue size");
Review Comment:
It'd be good to only log this warning on Linux. The file will never be there
on macOS so the warning is always going to happen, which isn't ideal. Maybe use
`System.getProperty("os.name")`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]