Back

[CLOSED] "_APP_CONNECTIONS_MAX" variable is not set after upgrading to 1.4.0

  • 0
  • Self Hosted
Krinnen
30 Aug, 2023, 16:44

After the update to 1.4.0 I couldn't run migration and it gave me this error: time="2023-08-30T18:43:10+02:00" level=warning msg="The _APP_CONNECTIONS_MAX variable is not set. Defaulting to a blank string." Failed to create connection: php_network_getaddresses: getaddrinfo failed: Name does not resolve

Going to localhost:80 also gives this error: {"message":"Error: Server Error","code":500,"version":"1.4.0"} Multiple containers randomly restarting.

TL;DR
The `_APP_CONNECTIONS_MAX` variable needs to be added in the `.env` file after upgrading to version 1.4.0. Also, update the MariaDB settings in the `docker-compose.yml` file. After making changes, run `docker compose down && docker compose up -d`.Other issues like php_network_getaddresses, Error: Server Error, and containers randomly restarting are unresolved.
Binyamin
30 Aug, 2023, 16:59

Check the first step in this answer.

Krinnen
30 Aug, 2023, 17:20

This doesn't fix these 2 errors:

  1. Failed to create connection: php_network_getaddresses: getaddrinfo failed: Name does not resolve
  2. {"message":"Error: Server Error","code":500,"version":"1.4.0"}
Drake
30 Aug, 2023, 17:35

"_APP_CONNECTIONS_MAX" variable is not set after upgrading to 1.4.0

Drake
30 Aug, 2023, 17:36

would you please create separate issues for each of these and include more of the errors

Krinnen
30 Aug, 2023, 17:39

👍 , these are the only errors I get.

Binyamin
30 Aug, 2023, 17:44

To fix the _APP_CONNECTIONS_MAX error edit your .env file and add the variable like so:

TypeScript
_APP_CONNECTIONS_MAX=151

Then make sure your MariaDB is like so in your docker-compose.yml file

TypeScript
  mariadb:
    image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
    container_name: appwrite-mariadb
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    volumes:
      - appwrite-mariadb:/var/lib/mysql:rw
    environment:
      - MYSQL_ROOT_PASSWORD=${_APP_DB_ROOT_PASS}
      - MYSQL_DATABASE=${_APP_DB_SCHEMA}
      - MYSQL_USER=${_APP_DB_USER}
      - MYSQL_PASSWORD=${_APP_DB_PASS}
    command: 'mysqld --innodb-flush-method=fsync --max_connections=${_APP_CONNECTIONS_MAX}'

Where the _APP_CONNECTIONS_MAX is sets in the bottom of that service.

Then run

TypeScript
docker compose down && docker compose up -d
Drake
30 Aug, 2023, 17:44
Drake
30 Aug, 2023, 18:06

Btw, we have a fix in the works for this

Krinnen
30 Aug, 2023, 18:27

[CLOSED] "_APP_CONNECTIONS_MAX" variable is not set after upgrading to 1.4.0

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more