James
James

Reputation: 1

Cannot access database containers due to timeout

I am running a MariaDB container on a Synology NAS. It worked fine before, but after installing traefik (and subsequently uninstalling it due to some unrelated problems) no container can access any database. Additionally if I try to connect to the containers via Adminer or PHPMyAdmin a timeout error occurs. Strangely when I connect to the container via HeidiSQL and a domain pointed to the NAS from my computer, i can access both. My OwnCloud installation was affected as well with the owncloud/server container throwing a "Database didn't come up in time!" error.

When looking at logs of the MariaDB container, no error or warning appears.

docker-compose.yml

version: "3.1"

services:
    phpmyadmin:
        image: phpmyadmin:latest
        restart: unless-stopped
        ports:
            - 8080:80
        volumes:
            - /volume1/docker/mariadb/phpmyadmin.php:/etc/phpmyadmin/config.user.inc.php
        networks:
            - pma
        depends_on:
            - instance-1

    instance-1:
        image: mariadb:latest
        restart: unless-stopped
        container_name: mariadb-instance-1
        env_file: /volume1/docker/mariadb/instance-1/mariadb.env
        ports:
            - "8081:3306"
        volumes:
            - /volume1/docker/mariadb/instance-1/data:/var/lib/mysql
            - /volume1/docker/mariadb/instance-1/my.cnf:/etc/mysql/my.cnf
        networks:
            - pma
            - mariadb_network

networks:
    pma:
    mariadb_network:

my.cnf

[client-server]
# Port or socket location where to connect
port = 3306
socket = /run/mysqld/mysqld.sock

# !includedir /etc/mysql/mariadb.conf.d/
# !includedir /etc/mysql/conf.d/

[mysqld]
bind-address=0.0.0.0
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
query-cache-type = ON
innodb-buffer-pool-size = 512M

[client]
default-character-set = utf8mb4

mariadb.env

TZ=UTC
MARIADB_ROOT_PASSWORD=...
MARIADB_USER=...
MARIADB_PASSWORD=...

phpmyadmin.php

<?php

$cfg['DefaultConnectionCollation'] = "utf8mb4_unicode_ci";
$cfg['FirstDayOfCalendar'] = 1;
$cfg["Console"]["Mode"] = "collapse";

$cfg['Servers'][1]['host'] = "mariadb-instance-1";
$cfg['Servers'][1]['port'] = "3306";
$cfg['Servers'][1]['auth_type'] = "cookie";

I have tried reinstalling all container images and the Synology Container Manager itself, changing various config values, reverse proxy settings and firewall settings.

Upvotes: 0

Views: 203

Answers (0)

Related Questions