MySQL InnoDB hangs on waiting for table-level locks

前端 未结 6 2033
抹茶落季
抹茶落季 2021-02-04 14:04

I have a big production web-application (Glassfish 3.1 + MySQL 5.5). All tables are InnoDB. Once per several days application totally hangs. SHOW FULL PROCESSLIST

6条回答
  •  粉色の甜心
    2021-02-04 14:18

    I think there are some situations when MySQL does a full table lock (i.e. using auto-inc). I found a link which may help you: http://mysqldatabaseadministration.blogspot.com/2007/06/innodb-table-locks.html

    Also review java persistence code having all con's commited/rollbacked and closed. (Closing always in finally block.)

    Try setting innodb_table_locks=0 in MySQL configuration. http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_table_locks

    Just a few ideas ...

提交回复
热议问题