Back

appwrite connection to galera cluster

  • 0
  • Self Hosted
  • Databases
dominikszmaj
25 Apr, 2024, 13:28

mariadb 11, all works well in docker compose and mariadb container, but when I changed to galera cluster it throws errors like that

TypeScript
Fatal error: Uncaught Exception: Failed to connect to database: Failed to create connection: SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers in /usr/src/code/app/http.php:85

Stack trace:
#0 [internal function]: {closure}()

}
  thrown in /usr/src/code/app/http.php on line 85
[2024-04-25 13:24:46 #1.4]    ERROR    php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Uncaught Exception: Failed to connect to database: Failed to create connection: SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers in /usr/src/code/app/http.php:85

Stack trace:
#0 [internal function]: {closure}()

}
  thrown in /usr/src/code/app/http.php on line 85
TL;DR
Developers having trouble connecting Appwrite to a Galera cluster in a Docker Swarm environment. Error indicates unknown charset being sent by the server. Possible solution: adjust charset settings in the Galera cluster configuration to match what Appwrite expects.
dominikszmaj
25 Apr, 2024, 13:30

target database details regarding that error: utf8mb4,utf8mb4_general_ci

dominikszmaj
25 Apr, 2024, 13:53

environment is docker swarm and mariadb is installed and replicated on each of 4 nodes

dominikszmaj
25 Apr, 2024, 13:54

so I tried to create only local connections to cut down on network latency as much as possible and expose db from host.docker.internal

dominikszmaj
25 Apr, 2024, 13:55

for all the other services I host it works perfectly well

dominikszmaj
25 Apr, 2024, 13:55

but appwrite has problems for some reason

dominikszmaj
25 Apr, 2024, 13:55

can someone suggest where to look for solution?

dominikszmaj
25 Apr, 2024, 13:56

I also deployed maxscale inside the cluster and if I connect appwrite to maxscale deployment, all works as expected

dominikszmaj
25 Apr, 2024, 13:57

despite the fact that maxscale works literally the same way, connecting to mariadb through host.docker.internal

dominikszmaj
25 Apr, 2024, 13:57

so something in the middle is destroying the connections... but how?

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