The requested URL was not found on this server. 不管你信不信,反正我是没找到

logstash_out_mongo从ES同步到mongo数据,大于1G报错!

Logstash | 作者 laoyang360 | 发布于2017年04月14日 | 阅读数:5504

[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 
已邀请:

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中查看到有效数据。

要回复问题请先登录注册