[
https://issues.apache.org/jira/browse/KAFKA-2462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16301910#comment-16301910
]
ASF GitHub Bot commented on KAFKA-2462:
---------------------------------------
guozhangwang closed pull request #164: KAFKA-2462: allow modifying soft limit
for open files in Kafka startup script
URL: https://github.com/apache/kafka/pull/164
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
index b689b2eea58..6f862b67638 100755
--- a/bin/kafka-run-class.sh
+++ b/bin/kafka-run-class.sh
@@ -154,6 +154,10 @@ while [ $# -gt 0 ]; do
DAEMON_MODE="true"
shift
;;
+ --soft-file-limit)
+ ulimit -n $2
+ shift 2
+ ;;
*)
break
;;
diff --git a/bin/kafka-server-start.sh b/bin/kafka-server-start.sh
index dc01d46a13f..79bb3da4528 100755
--- a/bin/kafka-server-start.sh
+++ b/bin/kafka-server-start.sh
@@ -16,7 +16,7 @@
if [ $# -lt 1 ];
then
- echo "USAGE: $0 [-daemon] server.properties [--override
property=value]*"
+ echo "USAGE: $0 [-daemon] [--soft-file-limit number] server.properties
[--override property=value]*"
exit 1
fi
base_dir=$(dirname $0)
@@ -37,6 +37,10 @@ case $COMMAND in
EXTRA_ARGS="-daemon "$EXTRA_ARGS
shift
;;
+ --soft-file-limit)
+ EXTRA_ARGS="--soft-file-limit ${2} "$EXTRA_ARGS
+ shift 2
+ ;;
*)
;;
esac
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> allow modifying soft limit for open files in Kafka startup script
> -----------------------------------------------------------------
>
> Key: KAFKA-2462
> URL: https://issues.apache.org/jira/browse/KAFKA-2462
> Project: Kafka
> Issue Type: Bug
> Reporter: Gwen Shapira
> Assignee: Gwen Shapira
>
> In some systems the hard limit for number of open files is set reasonably
> high, but the default soft limit for the user running Kafka is insufficient.
> It would be nice if the Kafka startup script could set the soft limit of
> number of files for the Kafka process to a user-defined value before starting
> Kafka.
> Something like:
> kafka-server-start --soft-file-limit 10000 config/server.properties
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)