Mattermost self hosted slow issue

Hi
we are using Mattermost Application in my Ubuntu 16.04 server

Mattermost Version: 5.11.0

Database Schema Version: 5.11.0

Database: mysql

I seen in my syslog it shows

Sep 30 11:46:48 localhost platform[8432]: {“level”:“debug”,“ts”:1664509608.0970445,“caller”:“web/handlers.go:58”,“msg”:“GET - /api/v4/users/me/teams/unread”}

my sql server shows

Aborted connection 3251 to db: ‘opstoolschat’ user: 'usernaem’ host: ‘server ip’ (Got an error reading communication packets)

give me a idea to clear this issue

Hi, would you be open to upgrading your server to a more recent version? We support server versions v7.1.0 and later. Please see these resources when upgrading:

Hi manivannan and welcome to the Mattermost forums!

To add on what Amy said: The message looks like one of the timeouts got reached in your MySQL installation. Can you reproduce this message or does it only happen from time to time? If you can reproduce it, try to find out after how many seconds it gets printed and when being logged in to your MySQL console, you can run the following command to see all the currently active timeouts:

SHOW VARIABLIES LIKE "%timeout%";

if one of them comes close to the duration you’re experiencing, try to increase it. Some of those variables can be increased on the fly (SET GLOBAL variable_name = value;), some require a restart for the change to take effect. Even if you set them using SET GLOBAL make sure to persist them in your my.cnf file afterwards, if this was the value that helped.
Also take a look at your slow queries to find out if some of them are running longer than the allotted max query time (there’s also a configuration option for that in your Mattermost’s config.json).

Is there any specific reason why you’re still on this ancient version? Custom modifications f.ex.?