Back

[SOLVED] PDOException : MySQLServer has gone away when uploading into the storage bucket

  • 0
  • Flutter
Drake
29 May, 2023, 16:33

Check the docker logs for your mariadb container

TL;DR
Issue: PDOException: MySQLServer has gone away when uploading into the storage bucket Solution: The user found a solution by using the docker exec command to enter the mariadb container and running the command "ALTER TABLE tablename ENGINE=InnoDB;". They also suggest checking the docker logs for the mariadb container. Additionally, they mention that when self-hosting, the user is responsible for managing the system, including the database. They provide various resources for further research on fixing the issue. Note: The user also mentions issues with a corrupted database and suggests searching online for solutions to the specific errors encountered. They also suggest upgrading the Flutter app
subroto
29 May, 2023, 17:00
subroto
29 May, 2023, 17:03

is this mysqld error 6 issue ? i am really lost understanding the logs...

subroto
29 May, 2023, 17:03

mysqld signal 6 sorry...

subroto
29 May, 2023, 17:11

starting with docker compose up .. i see that appwrite-worker is deleting a lot of documents...

subroto
29 May, 2023, 17:11

and this is what always rolls up...

subroto
29 May, 2023, 17:18

my latest flutter app is built flutter 3.7.8 ... dart sdk 2.19.5 i'm using appwrite 8.2.0 in pubspec yml... and i'm running appwrite 1.2.0...

iirc last time i updated my flutter apps built flutter 3.3.3 dart sdk 2.18 and with the same appwrite 1.2.0...

maybe upgrading may fix this ?

Drake
29 May, 2023, 17:22

2 things:

  1. FTS auxillary line is caused by a corrupted index. See https://dba.stackexchange.com/questions/195310/how-to-resolve-innodb-error-duplicate-key-writing-word-node-to-fts-auxiliary
  2. MySQLd error 6 is another corrupt DB error. You can search online for that
subroto
29 May, 2023, 17:22

appwrite-worker deletes a lot

Drake
29 May, 2023, 17:23

Are you deleting things?

subroto
29 May, 2023, 17:23

ALTER TABLE tablename ENGINE=InnoDB; how can i run this command though ?

Drake
29 May, 2023, 17:24

You might also run docker stats to see how your system is handling things

subroto
29 May, 2023, 17:24

i was deleting files from storage bukcet..but this always happens when starting up...

Drake
29 May, 2023, 17:25

Then that might explain the deletes.

Your database is already corrupted so...ya, you'll have problems until it's fixed

subroto
29 May, 2023, 17:26

i must admit i have no knowledge on mariadb... how do i got about fixing this ?

Drake
29 May, 2023, 17:43

Can't help you there. I guess it's time for you to do some research 😜

subroto
29 May, 2023, 17:45

gee.. i mean i use appwrite because i thought i don't have to deal with the underlying databases..

subroto
29 May, 2023, 17:45
subroto
29 May, 2023, 17:46

docker compose exec mariadb sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "show indexes from _2_database_3_collection_1"'

if i run the aboe... do i change $MYSQL_ROOT_PASSWORD with the rootpassword in my .env ?

Drake
29 May, 2023, 17:46

When you self host, you have to manage and take care of the system including the database

Drake
29 May, 2023, 17:48

No, $name dereferences an environment variable

subroto
29 May, 2023, 18:12

@Steven Levey ALTER TABLE tablename ENGINE=InnoDB; is there a general guide on mariadb appwrite overview ? do i run this using docker compose exec 'mysql .. ' as well ?

Drake
29 May, 2023, 23:00

These aren't appwrite specific things so I'm sure any resource you find online will suffice

subroto
30 May, 2023, 03:53

this does the trick, as the how to i got the hint from https://discord.com/channels/564160730845151244/1087377262640365728/1087377262640365728 albeit i'm not able to follow the guide using datagrip but was able to find another way by use of docker exec -it into the mariadb container. can be marked as solved.

subroto
30 May, 2023, 16:08

[SOLVED] PDOException : MySQLServer has gone away when uploading into the storage bucket

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