Zenoss 2.4.2 (253 devices, mostly routers and switches, about 25 Windows 
servers)
CentOS 5.2
Old system with:
 * AMD Opteron 2.2 GHz
 * 2 GB RAM

Every day, the ZenDeleteHistory.py script runs at around 11 AM.  Its purpose is 
to purge the event history table of events older than xx days. The problem is, 
CPU goes to 100% for over an hour, Zenoss is really slow and the Zenoss issues 
portlet reports bigger and bigger numbers.

So, I ran the script manually while logged in as user zenoss (command syntax 
discovered using ps).  See the output below.  What's going on?  Is the database 
in risk of corruption?

As a workaround, I have to set "Delete Historical Events Older Than (days) " 
back to 0 so the script doesn't run.

When the script is not running, the CPU is pretty heavily load.  TOP load is 
usually in the 1.5 to 3 range and average CPU WAIT is never over 60%.

Here's the output after about 90 minutes of hammering away at the CPU and hard 
drive (and it did not delete any history):

[zen...@msp000 ~]$ /usr/local/zenoss/python/bin/.python.bin 
/usr/local/zenoss/zenoss/Products/ZenUtils/ZenDeleteHistory.py --numDays=$1
delete h,j,d from history h LEFT JOIN log j ON h.evid = j.evid LEFT JOIN detail 
d ON h.evid = d.evid WHERE StateChange < DATE_SUB(NOW(), INTERVAL 60 day)
Traceback (most recent call last):
  File "/usr/local/zenoss/zenoss/Products/ZenUtils/ZenDeleteHistory.py", line 
77, in ?
    ZenDeleteHistory().deleteHistory()
  File "/usr/local/zenoss/zenoss/Products/ZenUtils/ZenDeleteHistory.py", line 
74, in deleteHistory
    toLog=toLog, table='history')
  File "/usr/local/zenoss/zenoss/Products/ZenEvents/EventManagerBase.py", line 
1411, in updateEvents
    curs.execute(query)
  File 
"/usr/local/zenoss/python/lib/python2.4/site-packages/MySQLdb/cursors.py", line 
137, in execute
    self.errorhandler(self, exc, value)
  File 
"/usr/local/zenoss/python/lib/python2.4/site-packages/MySQLdb/connections.py", 
line 33, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1206, 'The total number of locks exceeds 
the lock table size')
[zen...@msp000 ~]$

Matt

Matt




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=38657#38657

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to