Skip to content

Instantly share code, notes, and snippets.

@nyxz
Created June 2, 2016 14:17
Show Gist options
  • Save nyxz/3f3f04af509a9bba1682b85d34e61406 to your computer and use it in GitHub Desktop.
Save nyxz/3f3f04af509a9bba1682b85d34e61406 to your computer and use it in GitHub Desktop.
One time I started getting OutOfMemory: Cannot create native thread exception. This was due to limitation (for processes and threads) of my Fedora system which are set per user. The following configuration saved my day.
# For Fedora this file is located in /etc/security/limits.d
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 1024
root soft nproc unlimited
# Those are the limits set for my user 'nyxz' that I added to solve my problem.
nyxz soft nofile 4096
nyxz hard nofile 8192
nyxz soft nproc 30654
nyxz hard nproc 30654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment