You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sc...@apache.org on 2017/07/03 05:11:26 UTC

[trafficserver] branch master updated: In adjust_sys_settings(), if we try to adjust the NOFILE limit due to (fds_throttle > limit - THROTTLE_FD_HEADROOM), then try to set the new limit to (fds_throttle + THROTTLE_FD_HEADROOM) instead of just (fds_throttle) since the latter will always result in fds_throttle being reduced in check_fd_limit() later.

This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new e51b5e0  In adjust_sys_settings(), if we try to adjust the NOFILE limit due to (fds_throttle > limit - THROTTLE_FD_HEADROOM), then try to set the new limit to (fds_throttle + THROTTLE_FD_HEADROOM) instead of just (fds_throttle) since the latter will always result in fds_throttle being reduced in check_fd_limit() later.
e51b5e0 is described below

commit e51b5e0e387e99a9805974873b4a54896d980947
Author: Peter Chou <pb...@labs.att.com>
AuthorDate: Wed Jun 28 16:15:24 2017 -0700

    In adjust_sys_settings(), if we try to adjust the NOFILE limit due to
    (fds_throttle > limit - THROTTLE_FD_HEADROOM), then try to set
    the new limit to (fds_throttle + THROTTLE_FD_HEADROOM) instead of
    just (fds_throttle) since the latter will always result in
    fds_throttle being reduced in check_fd_limit() later.
---
 proxy/Main.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/Main.cc b/proxy/Main.cc
index 28ff754..d257a5e 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1107,7 +1107,7 @@ adjust_sys_settings()
 
   if (getrlimit(RLIMIT_NOFILE, &lim) == 0) {
     if (fds_throttle > (int)(lim.rlim_cur - THROTTLE_FD_HEADROOM)) {
-      lim.rlim_cur = (lim.rlim_max = (rlim_t)fds_throttle);
+      lim.rlim_cur = (lim.rlim_max = (rlim_t)(fds_throttle + THROTTLE_FD_HEADROOM));
       if (setrlimit(RLIMIT_NOFILE, &lim) == 0 && getrlimit(RLIMIT_NOFILE, &lim) == 0) {
         fds_limit = (int)lim.rlim_cur;
         syslog(LOG_NOTICE, "NOTE: RLIMIT_NOFILE(%d):cur(%d),max(%d)", RLIMIT_NOFILE, (int)lim.rlim_cur, (int)lim.rlim_max);

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].