Skip to content

Commit

Permalink
Merge commit '1a922025' into release-5.0-reverted-222
Browse files Browse the repository at this point in the history
  • Loading branch information
ahgittin committed Sep 4, 2018
2 parents cf28bf4 + 1a92202 commit a0314df
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions guide/ops/troubleshooting/increase-system-resource-limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ If you encounter the following error:
Caused by: java.io.IOException: Too many open files
at java.io.UnixFileSystem.createFileExclusively(Native Method)[:1.8.0

Please check the limit for opened files `cat /proc/sys/fs/file-max` and increase it.
You can increase the maximum limit of opened files by setting `fs.file-max` in `/etc/sysctl.conf`.
and then running `sudo sysctl -p` to apply the changes.

Please check and increase the limit for opened files.

If you encounter the error below, e.g. when running with many entities, please consider **increasing the ulimit**:

Expand All @@ -21,6 +18,42 @@ If you encounter the error below, e.g. when running with many entities, please c
On the VM running Apache Brooklyn, it is recommended that nproc and nofile are reasonably high
(e.g. 16384 or higher; a value of 1024 is often the default).

## For Centos 7
To check the current limits, you will need to know the PID for the brooklyn process. You can find
this by running `systemctl status brooklyn` and checking the `Main PID` line.

To see the current limits, run `cat /proc/<brooklyn PID>/limits` replacing <brooklyn PID> with the Main PID
from above

To override the default limits, you will need to create a `limits.conf` and populate it with the required
values as follows:

```
mkdir -p /etc/systemd/system/brooklyn.service.d
cat > /etc/systemd/system/brooklyn.service.d/limits.conf << EOF
[Service]
LimitNOFILE=16384
LimitNPROC=16384
EOF
```

You will then need to reload the systemctl daemon and restart brooklyn:

```
systemctl daemon-reload
systemctl restart brooklyn
```

To check the new limits, you will need to obtain the new brooklyn PID by running `systemctl status brooklyn`
and `cat`ing the process limits as above


## For Centos 6
Please check the limit for opened files `cat /proc/sys/fs/file-max` and increase it.
You can increase the maximum limit of opened files by setting `fs.file-max` in `/etc/sysctl.conf`.
and then running `sudo sysctl -p` to apply the changes.

If you want to check the current limits run `ulimit -a`. Alternatively, if Brooklyn is run as a
different user (e.g. with user name "brooklyn"), then instead run `ulimit -a -u brooklyn`.

Expand Down

0 comments on commit a0314df

Please sign in to comment.