Skip to content

Commit

Permalink
Add instructions on increasing max_map_count (influxdata#3932)
Browse files Browse the repository at this point in the history
* Add instructions on increasing max_map_count

* Update frequently-asked-questions.md

Co-authored-by: pierwill <[email protected]>
Co-authored-by: Scott Anderson <[email protected]>
  • Loading branch information
3 people authored Apr 22, 2022
1 parent 7117ab6 commit 8a016af
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Where applicable, it links to outstanding issues on GitHub.
* [Why am I seeing `error writing count stats ...: partial write` errors in my data node logs?](#why-am-i-seeing-error-writing-count-stats--partial-write-errors-in-my-data-node-logs)
* [Why am I seeing `queue is full` errors in my data node logs?](#why-am-i-seeing-queue-is-full-errors-in-my-data-node-logs)
* [Why am I seeing `unable to determine if "hostname" is a meta node` when I try to add a meta node with `influxd-ctl join`?](#why-am-i-seeing-unable-to-determine-if-hostname-is-a-meta-node-when-i-try-to-add-a-meta-node-with-influxd-ctl-join)
* [Why is InfluxDB reporting an out of memory (OOM) exception when my system has free memory?](#why-is-influxdb-reporting-an-out-of-memory-oom-exception-when-my-system-has-free-memory)

---

Expand Down Expand Up @@ -1333,3 +1334,35 @@ Meta nodes use the `/status` endpoint to determine the current state of another
`"nodeType":"meta","leader":"","httpAddr":"<hostname>:8091","raftAddr":"<hostname>:8089","peers":null}`
If you are getting an error message while attempting to `influxd-ctl join` a new meta node, it means that the JSON string returned from the `/status` endpoint is incorrect. This generally indicates that the meta node configuration file is incomplete or incorrect. Inspect the HTTP response with `curl -v "http://<hostname>:8091/status"` and make sure that the `hostname`, the `bind-address`, and the `http-bind-address` are correctly populated. Also check the `license-key` or `license-path` in the configuration file of the meta nodes. Finally, make sure that you specify the `http-bind-address` port in the join command, e.g. `influxd-ctl join hostname:8091`.
## Why is InfluxDB reporting an out of memory (OOM) exception when my system has free memory?
`mmap` is a Unix system call that maps files into memory.
As the number of shards in an InfluxDB Enterprise cluster increases, the number of memory maps increase.
If the number of maps exceeds the configured maximum limit, the node reports that it is out of memory.
To check the current number of maps the `influxd` process is using:
```sh
# Get the influxd process ID (PID)
PID=$(ps aux | awk '/influxd/ ${print 2}'
# Count the number of maps associated with the influxd process
wc -l /proc/$PID/maps
```
The `max_map_count` file contains the maximum number of memory map areas a process may have.
The default limit is `65536`.
We recommend increasing this to `262144` (four times the default) by running the following:
```sh
echo vm.max_map_count=262144 > /etc/sysctl.d/90-vm.max_map_count.conf
```
To make the changes permanent:
```sh
sysctl --system
```
Restart the `influxd` process and repeat on each node in your cluster.

0 comments on commit 8a016af

Please sign in to comment.