[root@Node-C146 bin]# ./logstash -f logstash_output_mongo/mongo_single.conf
Settings: Default pipeline workers: 24
Pipeline main started
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /opt/logstash/heapdump.hprof ...
Heap dump file created [455293752 bytes in 1.203 secs]
Pipeline main has been shutdown
Error: Your application used more memory than the safety cap of 1G.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace
[root@Node-C146 bin]# ./logstash -f logstash_output_mongo/mongo_lhy_single.conf -J-Xmx5000m
Settings: Default pipeline workers: 24
Pipeline main started
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /opt/logstash/heapdump.hprof ...
Heap dump file created [455293752 bytes in 1.203 secs]
Pipeline main has been shutdown
Error: Your application used more memory than the safety cap of 1G.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace
[root@Node-C146 bin]# ./logstash -f logstash_output_mongo/mongo_lhy_single.conf -J-Xmx5000m
1 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自:
修改:
文件:logstash.lib.sh, 路径:/opt/logstash/bin
LS_HEAP_SIZE="${LS_HEAP_SIZE:=1g}"
LS_HEAP_SIZE="${LS_HEAP_SIZE:=8g}"
即最大1g改为8g就可以了(比1g大)
修改后验证ok。
已经在mongo中查看到有效数据。