[Unit]
Description=publish-subscribe messaging rethought as a distributed commit log

[Service]
Type=simple
TimeoutStopSec=<%= scope.lookupvar('kafka::server::kill_timeout_seconds') %>

Environment=ENABLED=no
Environment=JAVA_HOME=
Environment=KAFKA_HEAP_OPTS=
Environment=GC_LOG_ENABLED=
Environment=JMX_PORT=
Environment=CLASSPATH=
Environment=LOG_DIR=
Environment=CLASSPATH=
Environment=KAFKA_JVM_PERFORMANCE_OPTS=
Environment=KAFKA_LOG4J_OPTS=
EnvironmentFile=/etc/default/kafka
User=kafka
Group=kafka
ExecStart=/bin/sh -c /etc/kafka/start.sh
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
[Unit]
Description=publish-subscribe messaging rethought as a distributed commit log

[Service]
Type=simple
TimeoutStopSec=<%= scope.lookupvar('kafka::server::kill_timeout_seconds') %>

Environment=ENABLED=no
Environment=JAVA_HOME=
Environment=KAFKA_HEAP_OPTS=
Environment=GC_LOG_ENABLED=
Environment=JMX_PORT=
Environment=CLASSPATH=
Environment=LOG_DIR=
Environment=CLASSPATH=
Environment=KAFKA_JVM_PERFORMANCE_OPTS=
Environment=KAFKA_LOG4J_OPTS=
EnvironmentFile=/etc/default/kafka
User=kafka
Group=kafka
ExecStart=/bin/sh -c /etc/kafka/start.sh
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target

Increase the limit of open files to 2^20
Increase the limit of open files to 2^20

This is the limit on most hosts nowadays and should prevent issues when
Kafka needs file when hosting a lot of partitions.

    $ sysctl fs.nr_open
    fs.nr_open = 1048576
