ECONNRESET with pool setting

#1

Hello! I use https://hub.docker.com/_/ghost (docker swarm, db mariadb (master->slave), ghost version 2.22-alpine) and my config for connect database:

        environment:
          database__client: mysql
          database__connection__host: mariadb-master
          database__connection__user: user
          database__connection__password: password
          database__connection__database: database
          database__pool__min: 2
          database__pool__max: 10
          database__pool__ping: function (conn, cb) { conn.query('SELECT 1', cb); }  }
          admin__url: https://domain/blog/
          url: https://domain/blog/

but I get an error after a while:

ECONNRESET

MariaDB has pool settings:

  mariadb-master:
    image: bitnami/mariadb:10.1.40-debian-9-r0
    volumes:
      - mariadb-data-master:/bitnami/mariadb
    networks:
      - internal
    labels:
      - traefik.enable=false
    environment:
      MARIADB_ROOT_PASSWORD: password
      MARIADB_USER: user
      MARIADB_PASSWORD:password
      MARIADB_DATABASE: database
      MARIADB_REPLICATION_MODE: master
      MARIADB_REPLICATION_USER: repl_user
      MARIADB_REPLICATION_PASSWORD: password
      MARIADB_EXTRA_FLAGS: --thread-handling=pool-of-threads

Help me please with problem.

#2

I got exactly same problem when running ghost docker image on localhost. Problem disapeared after deploying image to AWS instance. Only changes from localhost is that image is running In production enviroment on AWS. Not sure if problem will return if I change to development enviroment on aws.

#3

I am also using pooling. My thought was that problem is adressed to AWS-database rules and not Ghost source. Are your database also hosted In AWS?

#4

No, my database hosted at VPS

#5

I think these settings do not work

#6

All good with MariaDB? I’ve seen written several places that Ghost requires MySQL… I’d prefer to be running Maria.