Jump to content

This is a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Fundraising/Internal-facing/CiviCRM/Debugging deadlocks

From Wikitech
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

When you see a deadlock-related failmail, you can check for the query using innotop on the civi server.

innotop -h fundraisingdb-write.wmnet

Then use Q to get all the queries, and see what's the connection id and how long this query lasting, you can use ? to get all the action list, The query list after clicked Q should show the connection ID and the start of the text of the query. Our systemtools extension should prefix the query text with a user ID

 /* User : 161 */

to let you know who kicked the query off. To find the corresponding user, load this URL with the ID appended:

https://civicrm.wikimedia.org/civicrm/admin/user/#?User1=

You can then use

civicrm_query_killer -q <connection ID>

to stop the offending query.