Skip to content

Commit

Permalink
Added Fixes of ulimit into limits.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
okynos committed Jan 19, 2022
1 parent 5e59171 commit 68abb6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions indexer/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ if [ -z "$2" ]; then
echo "-Djava.security.policy=file:///usr/share/wazuh-indexer/plugins/opendistro-performance-analyzer/pa_config/es_security.policy" >> /etc/wazuh-indexer/jvm.options

# ---------------------------------------------------------------------------
sysctl -w vm.max_map_count=262144 > /dev/null 2>&1
ulimit -Hn 65535 > /dev/null 2>&1

echo "${USER} hard nproc 4096" >> /etc/security/limits.conf
echo "${USER} soft nproc 4096" >> /etc/security/limits.conf
echo "${USER} hard nofile 65535" >> /etc/security/limits.conf
echo "${USER} soft nofile 65535" >> /etc/security/limits.conf

sysctl -w vm.max_map_count=262144 > /dev/null 2>&1

if command -v sudo > /dev/null 2>&1; then
sudo -u ${USER} CLK_TK=`getconf CLK_TCK` OPENSEARCH_PATH_CONF=${CONFIG_DIR} ${INSTALLATION_DIR}/bin/opensearch --quiet > /dev/null 2>&1 &
Expand Down
2 changes: 1 addition & 1 deletion indexer/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ override_dh_install:
# -----------------------------------------------------------------------------

override_dh_strip:
dh_strip --no-automatic-dbgsym
dh_strip

# -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion indexer/deb/docker/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM debian:8

ENV DEBIAN_FRONTEND noninteractive

Expand Down

0 comments on commit 68abb6f

Please sign in to comment.