Possible memory issue crashing Hbase Thrift Server

房东的猫 提交于 2019-12-06 01:26:04

We had this exact same problem with our HBase Thrift setup, and ended up using a watchdog script that restarts Thrift if its not running.

Are you hitting your HBase server hard, several times a day? That could result in this. No way around this, Thrift does seem to take up (or leak) a lot of memory every time its used, so you need a watchdog script.

If a watchdog script is too heavy-duty, you could use a simple cron job to restart Thrift during frequent intervals to make sure it stays up.

The following cron restarts Thrift every two hours.

0 */2 * * * hbase-daemon.sh restart thrift

Using /etc/hbase/conf/hbase-env.sh, I increased my heap size, and this addressed the crashing issue.

# The maximum amount of heap to use, in MB. Default is 1000.
export HBASE_HEAPSIZE=8000

Thanks to Harsh J on the CDH Users mailing list for helping me figure out. As he pointed out, my lack of log messages indicates a kill -9 is probably taking place:

Indeed if a shutdown handler message is missing in the log tail pre-crash, there may have been a kill -9 passed to the process via the OOM handler.

increasing heap size may not be the solution always.

as per this cloudera blog,

Thrift server might be receiving invalid data. i would suggest to enable the Framed transport and compact protocol.

there's a catch if you enable these protocols on server, client should be using the same protocol.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!