Solving the Hue 2.X hanging problem

Solving the Hue 2.X hanging problem

In the Hue versions before 3, Hue is sometimes getting slow and “stuck”. To fix this problem, it is recommended to switch Hue to use the CherryPy server instead of Spawning. In the hue.ini or the Hue Safety Valve in CM, enter:

[desktop]
use_cherrypy_server = true

Cause:
Most of the time some timeout/Thrift errors can be seen in the Hue logs (/logs page). These errors are due to Beeswax crashing or being very slow and blocking all the requests as the Spawing Server is not perfectly greenified in Hue 2 (the unique Thread is blocked in the RPC IO call). This is fixed in CDH5 and improved in CDH4.5 by switching to HiveServer2.

CherryPy use 10 threads which is a good default. For more performance, 30 can be used.

Note: switching to CherryPy will disable the Shell Application but this one is replaced by the HBase Browser, Sqoop2 Editor and Pig Editor applications.

10 Comments

  1. Selvakumar K 5 years ago

    Hi Team,

    Am using Hue version 2.3 , When am downloading the data as excel or csv we are getting inconsistent file size , say 10 mb, 20mb , 100mb for same query on different run . You guys have a solution to this.

    • Hue Team 5 years ago

      2.3 is pretty old. We could not reproduce this on the latest 3.6 and HiveServer2. When are you planning to upgrade?

  2. Lindy W 4 years ago

    Hi,

    I did use the CherryPy server, but it’s still unresponsive, I’m using CDH 4.4, are they any solutions to that problem without upgrading the entire cluster to CDH 5.x? Would a recent Hue installed on the side would work with older CDH release?

  3. rocker xu 4 years ago

    Hi:
    In the Hue3.X, it used the cherryPy server as the default webserver, i want to know if it’s possible to use Apache server, is it any other configuration or can you provide some document. Thanks

    • Hue Team 4 years ago

      Yes, it is possible, we will have a blog post about this this week!

  4. nevereverv 4 years ago

    i still encounter the problems, that hue is getting slow and “stuck” in hue 3.7 version sometimes
    but when i restart hue service, it will become normally
    does some possible reasons for kind of questions

    • Hue Team 4 years ago

      Hue get some performances problems when all its threads are exhausted.

      http://gethue.com/using-nginx-to-speed-up-hue-3-8-0/ will greatly improve the perf (and will be out of the box in CM soon), we fixed several leaks and will optimize some pages. Using a database that is not SQLlite is highly recommended too.

  5. Dave M 4 years ago

    I noticed in the hue.ini that use_cherrypy_server=true is uncommented, but looking at the thread value :
    ## cherrypy_server_threads=10
    It appears to be commented out. What is the default number of server_treads if that is the case ? Running Hortonworks Distro, which ties me to an older version of Hue , ie 2.6.1, and am having problems with the cherrypy_server crashing and wondered about the thread config line. Please advise.

    • Hue Team 4 years ago

      Hello Dave. The Hue 2.6.1 had a default cherrypy_server_threads=10. We’ve sense bumped the default version to 40, which might help you out.

Leave a reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.