Last active
February 2, 2021 11:11
-
-
Save memandip/b87f6f4b2a7f521abae0bc405561680b to your computer and use it in GitHub Desktop.
Update file max, max map count and ulimit for linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------- | |
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