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/18 01:39:42 UTC

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

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