Call to Cloudera Manager API results in Packet for query is too large

0 votes
asked Aug 20, 2017 in Hadoop by admin (4,410 points)
SummaryWhen you post data to Cloudera Manager REST API, and the data size is too large, you will see this error when CM tries to save to backend database: "causes": "could not execute statement", "Packet for query is too large"
Applies To
  • Cloudera Manager
  • Mysql or MariaDB
When using Cloudera Manager API to configure CDH service, and get below error:
 { "message":
"org.hibernate.exception.GenericJDBCException: could not execute statement", 
"causes": "could not execute statement", "Packet for query is too large (1057646 > 1048576). 
 You can change this value on the server by setting the max allowed packet' variable."


If you run the show var command in a mysql session:
​mysql> show variables where Variable_name='max_allowed_packet';
It will show a default setting ( to 1M), which is smaller than what you are posting to Cloudera Manager. So CM fails to save it.


Increase max_allowed_packet setting for Mysql/Mariadb used for Cloudera Manager.

Please refer to:

Also, Cloudera recommends some mysqld configuration when you setup your own CM backend db, and Cloudera recommends to set "max_allowed_packet" to 32 M: 

Please log in or register to answer this question.