[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Large event database table and timeouts

From: Ryan Revels
Subject: Large event database table and timeouts
Date: Wed, 16 May 2012 13:22:53 -0500

I'm using PostgreSQL as my backend for M/Monit. The table event is currently over 1M lines. With a table this large, the Events page on the GUI times out with a JSON error:
Load error: Internal Server error

I've tried tweaking PostgreSQL and adding additional indexes to make the query faster but have had no luck. Is there a way to increase the 5 second timeout for this query when building the GUI table: SELECT event.hostid, AS hostname, event.collectedsec, AS servicename, event.state, event.message, event.hasnotice, FROM event, host, name nh, name ns   WHERE AND AND    ORDER BY event.collectedsec desc, event.collectedusec desc LIMIT 15 OFFSET 0;

If not, what is the proper way to remove old data to decrease the size of the table?
Is there another option I'm not considering?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]