1

我的应用程序日志中多次出现以下列出的错误。

2015-05-19 10:27:57,842 ERROR [Timer-3] [org.hibernate.util.JDBCExceptionReporter] Lock wait timeout exceeded; try restarting transactionCouldn't retrieve InnoDB stat
us due to underlying exception:

BEGIN NESTED EXCEPTION **
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException
MESSAGE: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation

STACKTRACE:

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

我知道当一个线程锁定了表的特定行并且第二个线程正在等待它并且这个等待时间超过一定时间时,可能会发生此错误。

但是如何优化 MySQL 配置或我的代码来克服这种情况呢?

我已经阅读了这篇关于隔离级别的文章,并且我已经将隔离级别设置为READ COMMITTED.

有没有我提到的专家建议/解决方案?

4

0 回答 0