轨道 - 轮胎 - 弹性搜索:需要重新启动弹性搜索服务器 [英] rails - tire - elasticsearch : need to restart elasticsearch server

查看:147
本文介绍了轨道 - 轮胎 - 弹性搜索:需要重新启动弹性搜索服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用轨道 - 轮胎 - 弹性搜索,一切都主要工作非常好,但只是不时,我的服务器开始非常慢。所以我必须重新启动弹性搜索服务,然后一切顺利。





我有一种印象,即批量插入(大约6000个产品)之后。可以链接吗?插入最后2分钟,但服务器出现问题后仍然存在



编辑:
最后没有链接到批量插入



我在日志中只有这一行

  [2013-06-29 01:15:32,767] [WARN] [monitor.jvm] [Jon Spectre] [gc] [ParNew] [26438] [9941]持续时间[3.4s],集合[1] / [5.2s],总计[3.4s] / [57.7s] ,[951.6mb]  - > [713.7mb] / [989.8mb],all_pools {[Code Cache] [10.6mb]  - > [10.6mb] / [48mb]} {[Par Eden Space] [241.1mb ]  -  [31mb] / [273mb]} {[幸存幸存者空间] [32.2mb]  -  [0b] / [34.1mb]} {[CMS Old Gen] [678.3mb]  - > 682.6mb ] / [682.6mb]} {[CMS Perm Gen] [35mb]  - > [35mb] / [166mb]} 

有人明白了吗?

解决方案

这只是在黑暗中刺伤,您的Java虚拟机可能存在不良的内存设置。



ElasticSearch使用Java构建,因此在JVM上运行。启动时,每个JVM进程都有一组定义的内存分配。当可用内存不足时,它会崩溃,所以它必须进行垃圾回收以释放空间。当您在内存限制上运行Java进程时,它会占用很多GC运行,并且将非常慢。



您可以看看java jmx管理控制台的进程正在做什么以及它有多少内存。


I use rails - tire - elasticsearch, everything is mainly working very well, but just from time to time, my server start to be very slow. So I have to restart elasticsearch service and then everything go fine again.

I have impression that it happens after bulk inserts (around 6000 products). Can it be linked? Inserts last like 2 min max, but still after server has problem

EDIT : finally it is not linked to bulk inserts

I have only this line in log

[2013-06-29 01:15:32,767][WARN ][monitor.jvm              ] [Jon Spectre] [gc][ParNew][26438][9941] duration [3.4s], collections [1]/[5.2s], total [3.4s]/[57.7s], memory [951.6mb]->[713.7mb]/[989.8mb], all_pools {[Code Cache] [10.6mb]->[10.6mb]/[48mb]}{[Par Eden Space] [241.1mb]->[31mb]/[273mb]}{[Par Survivor Space] [32.2mb]->[0b]/[34.1mb]}{[CMS Old Gen] [678.3mb]->[682.6mb]/[682.6mb]}{[CMS Perm Gen] [35mb]->[35mb]/[166mb]}

Does someone understand this ?

解决方案

This is just stabbing in the dark, but from what you report, there might be a bad memory setting for your java virtual machine.

ElasticSearch is built with Java and so runs on a JVM. Each JVM process has a defined set of memory to allocate when you start it up. When the available memory is not enough, it crashes, so it has to do garbage collection to free up space. When you run a Java process on the memory limit, it is occupied with a lot of GC runs and will get very slow.

You can have a look at the java jmx management console for what the process is doing and how much memory it has.

这篇关于轨道 - 轮胎 - 弹性搜索:需要重新启动弹性搜索服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆