Here's a breakdown of the SQL statements that run into this trouble Logstash Queries ---------------- "Lock wait timeout exceeded; try restarting transaction" = 2268 hits "Lock wait timeout exceeded; try restarting transaction" and NOT (@message:"UPDATE agents") = 808 hits "Lock wait timeout exceeded; try restarting transaction" and NOT (@message:"UPDATE agents") and NOT (@message:"INSERT INTO routerl3agentbindings") = 558 hits "Lock wait timeout exceeded; try restarting transaction" and NOT (@message:"UPDATE agents") and NOT (@message:"INSERT INTO routerl3agentbindings") and NOT (@message:"UPDATE ports") = 3 hits ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Number of hits: 1460 2013-09-27 16:44:32.559 2778 TRACE neutron.openstack.common.rpc.amqp OperationalError: (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'UPDATE agents SET heartbeat_timestamp=%s, configurations=%s WHERE agents.id = %s' (datetime.datetime(2013, 9, 27, 16, 43, 41, 432257), '{"router_id": "", "gateway_external_network_id": "", "handle_internal_only_routers": true, "use_namespaces": true, "routers": 5, "interfaces": 5, "floating_ips": 0, "interface_driver": "neutron.agent.linux.interface.OVSInterfaceDriver", "ex_gw_ports": 5}', 'e4b2e255-ee2a-40e1-a3c3-938269a03b28') ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Number of hits: 250 2013-09-18 13:15:32.212 31226 TRACE neutron.openstack.common.rpc.amqp OperationalError: (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'UPDATE ports SET admin_state_up=%s, device_id=%s, device_owner=%s WHERE ports.id = %s' (1, '08d955df-9810-5417-81bf-ae8c785d3ac4', 'neutron:LOADBALANCER', '14e47f8d-6515-421c-94f9-f472f1a030e4') ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Number of hits: 555 2013-09-27T01:51:42.000 [-] Returning exception (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'INSERT INTO routerl3agentbindings (id, router_id, l3_agent_id) VALUES (%s, %s, %s)' ('b87db1d2-35f6-467a-8743-930a2992a24a', '0ea9e7b5-13ba-4cfb-af72-007197e03dee', '29ede799-5b15-4a54-9f87-64811e687fde') to caller ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Number of hits: 3 2013-09-18T01:35:39.000 [-] Returning exception (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'DELETE FROM securitygroupportbindings WHERE securitygroupportbindings.port_id = %s AND securitygroupportbindings.security_group_id = %s' ('97f0e811-9be3-4eff-9383-030432a119de', '039fefd7-87bf-4294-9a88-ded7e33777dc') to caller ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------