TECHZEN Zenoss User Community ARCHIVE  

Not able to delete some old events due to deadlock

Subject: Not able to delete some old events due to deadlock
Author: Amit Kshirsagar
Posted: 2014-03-25 19:50

Hi,

There was an event storm after which I was able to clean most of the events but not able to delete around 30k events from the table. "show engine innodb status\G" is showing DEADLOCK. How should I clear it

Any help here appreciated. Thanks in advance.

Amit

------------------------
LATEST DETECTED DEADLOCK
------------------------
140324 22:13:04
*** (1) TRANSACTION:
TRANSACTION A129222, ACTIVE 0 sec
mysql tables in use 1, locked 1
LOCK WAIT 121 lock struct(s), heap size 14776, 20 row lock(s)
MySQL thread id 162, OS thread handle 0x2b81e840f940, query id 292166 localhost 127.0.0.1 zenoss Searching rows for update
UPDATE event_summary SET status_id=6,status_change=1395713584493,update_time=1395713584493 WHERE last_seen < 1395699184493 AND severity_id IN (0, 1, 2, 3) AND status_id NOT IN (6, 4, 3) LIMIT 1000
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 217816 n bits 80 index `PRIMARY` of table `zenoss_zep`.`event_summary` trx id A129222 lock_mode X locks rec but not gap waiting
Record lock, heap no 4 PHYSICAL RECORD: n_fields 40; compact format; info bits 0
0: len 16; hex 003048c6977ab19611e3976a789253b8; asc 0H z jx S ;;
1: len 6; hex 00000a129229; asc );;
2: len 7; hex 4a0001537c05ed; asc J S| ;;
3: len 20; hex 2a06c40267c68e9e3d4daed3015db63cf5f1fe84; asc * g =M ] < ;;



Subject: I recommend stopping zenoss,
Author: [Not Specified]
Posted: 2014-03-26 08:18

I recommend stopping zenoss, stopping MySQL, and then reboot. If the events don't clear, take a look at this article: http://wiki.zenoss.org/Working_with_Queues

You don't want to delete events from MySQL or it could possibly break the relationship of the event.

Hydruid



Subject: Thanks. I just had to wait
Author: Amit Kshirsagar
Posted: 2014-03-27 07:29

Thanks. I just had to wait for 1 day and it slowly cleared all the stale events.
Everything looks good now.

------------------------
LATEST DETECTED DEADLOCK
------------------------
140327 2:00:35
*** (1) TRANSACTION:
TRANSACTION AAD3759, ACTIVE 0 sec fetching rows
mysql tables in use 1, locked 1
LOCK WAIT 58 lock struct(s), heap size 6960, 477 row lock(s)
MySQL thread id 31172, OS thread handle 0x2ae74c71b940, query id 29822626 localhost 127.0.0.1 zenoss Searching rows for update
UPDATE event_summary SET status_id=6,status_change=1395900035041,update_time=1395900035041 WHERE last_seen < 1395885635041 AND severity_id IN (0, 1, 2, 3) A ND status_id NOT IN (6, 4, 3) LIMIT 1000
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 400022 n bits 96 index `PRIMARY` of table `zenoss_zep`.`event_summary` trx id AAD3759 lock_mode X locks rec but not gap wait ing



Subject: Glad to hear it's resolved!
Author: [Not Specified]
Posted: 2014-03-27 08:56

Glad to hear it's resolved!

Hydruid



< Previous
User's roles disappear, can't see events
  Next
Creating a template with multiple responses for one oid
>