Skip to content

Instantly share code, notes, and snippets.

@memandip
Last active February 2, 2021 11:11
Show Gist options
  • Save memandip/b87f6f4b2a7f521abae0bc405561680b to your computer and use it in GitHub Desktop.
Save memandip/b87f6f4b2a7f521abae0bc405561680b to your computer and use it in GitHub Desktop.
Update file max, max map count and ulimit for linux
-------------------------------------------------------------
You can use the following config in docker-compose.yml
ulimits:
nofile:
soft: 65536
hard: 65536
OR
-------------------------------------------------------------
fs.file-max = 65535
vm.max_map_count=262144
Add above 2 lines at the end of /etc/sysctl.conf file
Run sudo sysctl -p
-------------------------------------------------------------
* hard nofile 65535
* soft nofile 65535
* hard nproc 65535
* soft nproc 65535
Update /etc/security/limits.conf file with above lines
Reboot your server
Make sure that OS limits have been updated
- ulimit -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment