You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/16 13:17:39 UTC

[GitHub] [apisix] yunkunrao opened a new pull request #5078: Add ulimit too small prompt

yunkunrao opened a new pull request #5078:
URL: https://github.com/apache/apisix/pull/5078


   Signed-off-by: rao yunkun <yu...@gmail.com>
   
   ### What this PR does / why we need it:
   
   This PR is related with #2467
   
   ### Pre-submission checklist:
   
   * [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #5078: feat: add ulimit too small prompt

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #5078:
URL: https://github.com/apache/apisix/pull/5078


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunkunrao commented on a change in pull request #5078: feat: add ulimit too small prompt

Posted by GitBox <gi...@apache.org>.
yunkunrao commented on a change in pull request #5078:
URL: https://github.com/apache/apisix/pull/5078#discussion_r711420912



##########
File path: apisix/cli/env.lua
##########
@@ -28,6 +28,12 @@ local package = package
 
 
 return function (apisix_home, pkg_cpath_org, pkg_path_org)
+    -- ulimit setting should be checked when APISIX starts
+    ulimit = tonumber(util.trim(util.execute_cmd("ulimit -n")))

Review comment:
       Got it

##########
File path: apisix/cli/ops.lua
##########
@@ -307,6 +307,10 @@ local function init(env)
               .. 'other than /root.')
     end
 
+    if env.ulimit <= 1024 then
+        print(str_format("Warning! Current user limits [%d] is too small, please modify user limits by execute \'ulimt -n <new user limits>\' , otherwise the performance is low.", env.ulimit))

Review comment:
       Got it




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunkunrao commented on a change in pull request #5078: feat:add ulimit too small prompt

Posted by GitBox <gi...@apache.org>.
yunkunrao commented on a change in pull request #5078:
URL: https://github.com/apache/apisix/pull/5078#discussion_r710642758



##########
File path: apisix/cli/ops.lua
##########
@@ -307,6 +307,10 @@ local function init(env)
               .. 'other than /root.')
     end
 
+    if env.ulimit <= 1024 then
+        print(str_format("Warning! Current user limits [%d] too small, please modify user limits by execute \'ulimt -n <new user limits>\' , otherwise the performance is low.", env.ulimit))

Review comment:
       Got it.




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #5078: Add ulimit too small prompt

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #5078:
URL: https://github.com/apache/apisix/pull/5078#discussion_r710116654



##########
File path: apisix/cli/ops.lua
##########
@@ -307,6 +307,10 @@ local function init(env)
               .. 'other than /root.')
     end
 
+    if env.ulimit <= 1024 then
+        print(str_format("Warning! Current user limits [%d] too small, please modify user limits by execute \'ulimt -n <new user limits>\' , otherwise the performance is low.", env.ulimit))

Review comment:
       ```suggestion
           print(str_format("Warning! Current user limits [%d] is too small, please modify user limits by execute \'ulimt -n <new user limits>\' , otherwise the performance is low.", env.ulimit))
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5078: feat:add ulimit too small prompt

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5078:
URL: https://github.com/apache/apisix/pull/5078#discussion_r710722041



##########
File path: apisix/cli/env.lua
##########
@@ -28,6 +28,12 @@ local package = package
 
 
 return function (apisix_home, pkg_cpath_org, pkg_path_org)
+    -- ulimit setting should be checked when APISIX starts
+    ulimit = tonumber(util.trim(util.execute_cmd("ulimit -n")))

Review comment:
       Should check the `nil, err` returned from execute_cmd, and log the err

##########
File path: apisix/cli/ops.lua
##########
@@ -307,6 +307,10 @@ local function init(env)
               .. 'other than /root.')
     end
 
+    if env.ulimit <= 1024 then
+        print(str_format("Warning! Current user limits [%d] is too small, please modify user limits by execute \'ulimt -n <new user limits>\' , otherwise the performance is low.", env.ulimit))

Review comment:
       Better to mention what kind of the limit




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org