Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions core/trino-server-rpm/src/main/resources/dist/etc/init.d/trino
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ CONFIGURATION=(
--server-log-file "${SERVER_LOG_FILE:-/var/log/trino/server.log}"
)

# As defined in the requirements: https://trino.io/docs/current/installation/deployment.html#requirements
files_limit=131072
Comment thread
nineinchnick marked this conversation as resolved.
Outdated
if current_limit=$(ulimit -Hn) && [ "${files_limit}" -lt "${current_limit}" ]; then
files_limit="${current_limit}"
fi
if max_limit=$(cat /proc/sys/fs/nr_open) && [ "${files_limit}" -gt "${max_limit}" ]; then
files_limit="${max_limit}"
fi
ulimit -n "${files_limit}"

declare -A CONFIG_ENV
# Don't need shellcheck to follow env.sh
# shellcheck disable=1091
Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/installation/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Linux operating system
trino soft nofile 131072
trino hard nofile 131072

..
These values are used in core/trino-server-rpm/src/main/resources/dist/etc/init.d/trino

.. _requirements-java:

Java runtime environment
Expand Down