Database Massive Growth 5.12

Hi all,

I just finish backing up and updating MM server to 5.12.1 and I’ve noticed a strange database growth. Much larger than previous backups (per month).

Can someone have a look at database changes done on version v5.12 and check if there are duplicated tables or unnecessary columns or old tables left from old versions.

Basically clean the database from unused content.

Cheers

I did some investigation and it seems the issue is happening in the “Jobs” table.

There are around 600 rows added like the data below in just a month.

(‘xxxxxxxx’, ‘plugins’, 0, nnnnnnn, nnnnnnn, nnnnnnn, ‘success’, 0, ‘null’)

My server actually have plugins disable since they don’t work on the mobile client apps.

What could this be? Is this necessary?

Cheers

Hi @RbDev, our dev gave feedback that they’re not sure what that job does, but 600 rows added in a month is a pretty minor growth.

@RbDev, are all the new rows of type Plugin? This particular job is responsible for cleaning up expired key value entries, and runs fairly frequently. I’m scratching my head as to why it’s recording an entry in the database each time. How many new entries are you getting a day?

Hi @amy.blais and @jesse,

There are 195075 with the same type ‘plugins’. From what you said it should only be 1?

Yes it should if we are talking about the same service saved in a normalised table.

Let me know if you need anything else.

Cheers

Thanks @RbDev, this definitely appears to be a mistake. We’re going to triage this one to determine urgency, but I expect we’ll fix both the issue + clean up the spurious records.

Ticket: https://mattermost.atlassian.net/browse/MM-16796.

Hi @Jesse,

I suggest to check the other tables to make sure they are working ok and perform a database clean.

With new releases, changes are done to the tables that can affect its functionality. also old content are left behind for compatibility purposes that, later on, are not required anymore and can be removed.

Cheers

Thanks, @RbDev. This particular issue is definitely specific to the Jobs table. If you spot any other anomalies, let us know!

We usually reserve general “cleanup” for major versions so that we can maintain backwards compatibility at the database level across minor versions. We’ll probably do some more cleanup in 6.0, whenever that is scheduled.