hi. We are running 1.0.3 but have started getting 502 or 504 errors on the API calls to recent dashboards and queries
has anyone seen this before?
This happens only on the home page.
api_error.log is just every second saying cannot reach 127.0.0.1:5000
api.log is empty
yesterday those calls were taking 1min to return.
There hasn’t been any significant increase in load or queries or dashboards in the last two days.
There are two possible issues here I can think of:
events table grew too large, and these two API calls are taking too long to respond.
- There is a bug you’re hitting with these two API calls.
I remember seeing something with the
api/queries/recent call that I fixed before the 1.0.3 or 2.0.0 release.
Try tailing the
api_error.log log when calling one of this API calls and seeing if there are any meaningful errors. If it’s indeed option #1 (too many events), then you can either trim the table or upgrade to 2.0.0 and use the “dumb recents” option.
Thanks Arik. I think we’re hiring the first point. We have events from 2014! I’ll clean up and check again.
Regarding the bug, I didn’t see anything unusual in the logs.
So I removed all events pre 2017 from events and vacuumed and analyzed the table. both the calls now return in couple of seconds.