We’re currently seeing a regular database crash which on investigation is always running the following statement at the moment it crashes.
Query (0x7f21226d9be0): SELECT p.*, (SELECT COUNT(Posts.Id) FROM Posts WHERE Posts.RootId = (CASE WHEN p.RootId = ‘’ THEN p.Id ELSE p.RootId END) AND Posts.DeleteAt = 0) AS ReplyCount FROM Posts p WHERE ((Id IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) OR RootId IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)) AND ChannelId = ? AND DeleteAt = ?) ORDER BY CreateAt DESC
That looks like something internal, but not sure how to diagnose beyond this. Is it something anyone else has come across previously?
This is mattermost 5.37.1 running on CentOS 7 using Maria 10.5.12 - we’ve been rock solid with mattermost and the database before now, but this has now crashed maybe 6-8 times in the last 24 hours.
Other info - the Table size is fairly large, about 4.5G. The upgrade past I think 5.35 that made database changes did take a reasonable amount of time to complete, so not surprised if this turns out to be a size/timeout thing. I have increased the query timeout overnight by a few minutes, but unfortunately hasn’t made any difference.
We’ll be trying some general mysql maintenance overnight, but in case it’s something specific to mattermost I thought I’d ask if anyone else has seen anything.I have posted this to support (we have an E10 instance), but just in case anyone here can help as well.
Thanks,
Paul
–