If Hue displays the "1040, Too many connections" exception, then it is possible that
the Hue backend database is overloaded and out of maximum available connections. To resolve
this issue, you can increase the value of the
max_connections
property for
your database.
The 1040, 'Too many connections' exception occurs on a MySQL database when it runs
out of maximum available connections. If you are using the Impala engine, you may
see the following error message on the Hue web interface:
OperationalError
at /desktop/api2/context/computes/impala("1040: too many connections")
.
A similar error may be displayed for Hive. The exception is also captured in the Hue
server logs.
The
max_connections
property defines the
maximum number of connections that a MySQL instance can accept. Uncontrolled number of
connections can crash the server. Following are some guidelines for tuning the value of
the
max_connections
property:
Log in to Cloudera Manager and stop the Hue service.
SSH in to your database instance as a root user.
Check the number of available connections by running the following
command:
grep max_conn /etc/my.cnf
/etc/my.cnf
is the default location of the options file
(
my.cnf
).
Set the new value of the
max_connections
property from the
MySQL shell as per the guidelines provided above. For example:
mysql> SET GLOBAL max_connections = 550;