[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, nh.name AS hostname, event.collectedsec, ns.name AS servicename, event.state, event.message, event.hasnotice, event.id FROM event, host, name nh, name ns WHERE event.hostid=host.id AND host.nameid=nh.id AND event.service_nameid=ns.id 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?
Thanks,
Ryan
- Large event database table and timeouts,
Ryan Revels <=