... | ... | @@ -60,3 +60,27 @@ You can install it with this command `bin/logstash-plugin install file:///usr/sh |
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
### logstash-plugin 提示内存不足, 但物理内存其实还有剩余
|
|
|
|
|
|
现象:
|
|
|
|
|
|
```
|
|
|
(base) [root@bdp-ls-001 logstash]# ./bin/logstash-plugin
|
|
|
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000004e9990000, 12187009024, 0) failed; error='Cannot allocate memory' (errno=12)
|
|
|
#
|
|
|
# There is insufficient memory for the Java Runtime Environment to continue.
|
|
|
# Native memory allocation (mmap) failed to map 12187009024 bytes for committing reserved memory.
|
|
|
# An error report file with more information is saved as:
|
|
|
# /usr/share/logstash/hs_err_pid26195.log
|
|
|
```
|
|
|
|
|
|
可以通过设置LS_JVM_OPTS
|
|
|
|
|
|
```
|
|
|
LS_JAVA_OPTS="-Xms256m -Xmx512m" /usr/share/logstash/bin/logstash-plugin list
|
|
|
```
|
|
|
|
|
|
参考:https://github.com/elastic/logstash/blob/v5.5.2/bin/logstash.lib.sh#L31-L49
|
|
|
|