2020-10-13 18:41:03,561 ERROR org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-5-thread-121151]: Retrying HMSHandler after 2000 ms (attempt 7 of 10) with error: javax.jdo.JDOUserException: One or more instances could not be made persistent
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistentAll(JDOPersistenceManager.java:787)
...
Nested Throwables StackTrace:
java.sql.SQLException: The total number of locks exceeds the lock table size
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
复制代码
HiveServer2 日志:
2.通过查找资料,MySQL报“The total number of locks exceeds the lock table size”应该是Hive的锁表或者大量查询导致innodb_buffer_pool_size不够大导致。
3.2 CM层面分析问题
1.查看cloudera-scm-server.log日志,发现从18:06开始一直到CM重启恢复正常,一直有The total number of locks exceeds the lock table size 【2】报错,此报错和我们在HiveServer2和Hive MetaStore 日志看到的是一样的。
【2】
CM Server 日志:
2020-10-13 18:06:43,097 ERROR 1587731234@scm-web-21766:org.hibernate.engine.jdbc.spi.SqlExceptionHelper: The total number of locks exceeds the lock table size
Caused by: java.sql.SQLException: The total number of locks exceeds the lock table size
2020-10-13 18:18:14,418 ERROR 2022524682@scm-web-21780:org.hibernate.engine.jdbc.spi.SqlExceptionHelper: The total number of locks exceeds the lock table size
2020-10-13 18:34:22,883 ERROR MainThread:org.hibernate.engine.jdbc.spi.SqlExceptionHelper: The total number of locks exceeds the lock table size
Caused by: java.sql.BatchUpdateException: The total number of locks exceeds the lock table size