Run Mattermost using AWS Aurora serverless

Can’t run Mattermost using AWS Aurora serverless because can’t ping

I am using the latest version of Mattermost server running on an AWS EC2 instance. I can connect to the Aurora serverless database no problem using the command:
mysql — user=[user] --password -h [endpoint of cluster]).

I then try to start the mattermost server using the command:
sudo -u mattermost ./bin/mattermost

That fails because in order to start the mattermost server, it tries to ping the database, and it can’t:

{“level”:“info”,“ts”:1551280409.4031305,“caller”:“app/app.go:143”,“msg”:“Server is initializing…”}
{“level”:“info”,“ts”:1551280409.405245,“caller”:“sqlstore/supplier.go:207”,“msg”:“Pinging SQL master database”}
[mysql] 2019/02/27 15:13:59 packets.go:36: read tcp x.x.x.x:36150->x.x.x.x:3306: i/o timeout
{“level”:“error”,“ts”:1551280439.434761,“caller”:“sqlstore/supplier.go:219”,“msg”:“Failed to ping DB retrying in 10 seconds err=context deadline exceeded”}

I try to ping the DB endpoint myself but I can’t either. I have reached AWS support and they say that by default the DB can’t be pinged, and that it can’t be changed.

So my main question is, has anyone successfully gotten to run Mattermost server with Aurora serverless DB?

2 follow up questions are:
Can Mattermost be configured to NOT ping the DB and just start?

Even though AWS support says that the configuration can’t be changed, has anybody been able to ping a serverless Aurora DB? (note: I have configured the Aurora Cluster Security Group to allow ICMP pings, and the ACL associated with the subnets to allow all traffic)?

Any help would be greatly appreciated it!

Thank you.

Hi @Miguel,

From a community member:

You might be confusing DB pings and ICMP echo requests. The TCP i/o timeout looks suspicious. Would you be able to post your Mattermost database configuration?

Hi Amy, thank you for your help!

Here is the DB configuration (password edited)

“SqlSettings”: {
“DriverName”: “mysql”,
“DataSource”: “mmuser:password@tcp(,utf8\u0026readTimeout=30s\u0026writeTimeout=30s”,

    "DataSourceReplicas": [],                                                                                                           
    "DataSourceSearchReplicas": [],                                                                                                     
    "MaxIdleConns": 20,                                                                                                                 
    "ConnMaxLifetimeMilliseconds": 3600000,                                                                                             
    "MaxOpenConns": 300,                                                                                                                
    "Trace": false,                                                                                                                     
    "AtRestEncryptKey": "**key**",                                                                             
    "QueryTimeout": 30                                                                                                                  

Hi, everyone.

To avoid duplicated efforts, this issue is currently being discussed in the latest post here:


Hi everyone,

Is this issue resolved ? I ran into the same problem.


Hello, @revanthgopi

The discussion is ongoing in How to start the server without pinging the DB thread. I would recommend you to share more details in that post so we can discuss about the issue further and gather more thoughts on thi.