Page MenuHomePhabricator

Destroying a repository exceeds MySQL lock limits
Closed, ResolvedPublic

Description

See https://github.com/phacility/phabricator/issues/716

Relevant trace:

[2014-09-01 11:11:26] EXCEPTION: (AphrontQueryException) #1206: The total number of locks exceeds the lock table size at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:308]
  #0 AphrontMySQLDatabaseConnectionBase::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:275]
  #1 AphrontMySQLDatabaseConnectionBase::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:181]
  #2 AphrontMySQLDatabaseConnectionBase::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string) called at [<phabricator>/src/applications/repository/storage/PhabricatorRepository.php:1123]
  #4 PhabricatorRepository::delete() called at [<phabricator>/src/applications/repository/storage/PhabricatorRepository.php:1561]
  #5 PhabricatorRepository::destroyObjectPermanently(PhabricatorDestructionEngine) called at [<phabricator>/src/applications/system/engine/PhabricatorDestructionEngine.php:40]
  #6 PhabricatorDestructionEngine::destroyObject(PhabricatorRepository) called at [<phabricator>/src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php:98]
  #7 PhabricatorSystemRemoveDestroyWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:394]
  #8 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:290]
  #9 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_remove.php:21]

I don't understand the lock limit mechanism and other users haven't hit this.

Event Timeline

epriestley raised the priority of this task from to Wishlist.
epriestley updated the task description. (Show Details)
epriestley added a project: Diffusion.
epriestley added a subscriber: epriestley.

From what I can tell, the easiest way to resolve this is to increase innodb_buffer_pool_size. Generally, increasing innodb_buffer_pool_size is desirable anyway, because it will tend to improve performance overall.

I'm going to address this by adding a generic innodb_buffer_pool_size setup check.