Hi, I have a Nextcloud Box up and running since two weeks and it worked fine so far. Since today I can’t upload larger files any more. I get an error message that my SQL connection went away:
Fehler beim Hochladen der Datei "StMartin.mp4": An exception occurred while executing 'SELECTfileid,storage,path,parent,name,mimetype,mimepart,size,mtime,storage_mtime,encrypted,etag,permissions,checksumFROMoc_filecacheWHEREstorage= ? ANDpath_hash= ?' with params ["3", "870dc9bfc71ef14d08c125b4d2388ca0"]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
First I tried it with Nextcloud Client, then directly through the browser, but same result. This file is 800 MB, a smaller file (50 MB) worked fine.
Hi Marius, thanks for your help. I’m running 10.0.1 (stable). The last thing I did was a apt-get upgrade last night and a reboot after that. But I think it was still running earlier this morning.
If there are any log files I can provide just let me know.
It tries to start MySQL, waits for some time and then fails. Again and again.
Nov 05 17:30:19 ubuntu-standard snap[2580]: Starting MySQL
Nov 05 17:30:19 ubuntu-standard snap[2580]: .
Nov 05 17:30:19 ubuntu-standard snap[2580]: Waiting for server...
Nov 05 17:30:19 ubuntu-standard snap[2580]: Checking/upgrading mysql tables if necessary...
Nov 05 17:30:19 ubuntu-standard snap[2580]: mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/snap/nextcloud/48/mysql/mysql.sock' (2) while connecting to the MySQL server
Nov 05 17:30:19 ubuntu-standard snap[2580]: Upgrade process encountered error and will not continue.
Nov 05 17:30:19 ubuntu-standard snap[2615]: MySQL server process #2494 is not running! ... failed!
Nov 05 17:30:50 ubuntu-standard systemd[1]: snap.nextcloud.mysql.service: State 'stop-sigterm' timed out. Killing.
Nov 05 17:30:50 ubuntu-standard systemd[1]: snap.nextcloud.mysql.service: Unit entered failed state.
Nov 05 17:30:50 ubuntu-standard systemd[1]: snap.nextcloud.mysql.service: Failed with result 'timeout'.
Nov 05 17:30:50 ubuntu-standard systemd[1]: snap.nextcloud.mysql.service: Service hold-off time over, scheduling restart.
Nov 05 17:30:50 ubuntu-standard systemd[1]: Stopped Service for snap application nextcloud.mysql.
Nov 05 17:30:50 ubuntu-standard systemd[1]: Started Service for snap application nextcloud.mysql.
Nov 05 17:30:50 ubuntu-standard snap[2829]: 2016-11-05T17:30:50.568750Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
Nov 05 17:30:50 ubuntu-standard snap[2829]: 2016-11-05T17:30:50.569486Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
Nov 05 17:30:50 ubuntu-standard snap[2829]: 2016-11-05T17:30:50.570946Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
Nov 05 17:30:50 ubuntu-standard snap[2829]: 2016-11-05T17:30:50.580355Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
Nov 05 17:30:50 ubuntu-standard snap[2829]: 2016-11-05T17:30:50.580615Z 0 [ERROR] Aborting
Nov 05 17:30:50 ubuntu-standard snap[2829]: Starting MySQL
Nov 05 17:30:50 ubuntu-standard snap[2829]: .
Nov 05 17:30:50 ubuntu-standard snap[2829]: Waiting for server...
Nov 05 17:30:50 ubuntu-standard snap[2829]: Checking/upgrading mysql tables if necessary...
Nov 05 17:30:50 ubuntu-standard snap[2829]: mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/snap/nextcloud/48/mysql/mysql.sock' (2) while connecting to the MySQL server
Nov 05 17:30:50 ubuntu-standard snap[2829]: Upgrade process encountered error and will not continue.
Nov 05 17:30:50 ubuntu-standard snap[2864]: MySQL server process #2794 is not running! ... failed!
I can provide the whole output as file if you wish. So far we only have 800 files (maybe 2 GB in total and less than 10 users on the Nextcloud Box.
This looks a bit weird to me:
sudo nextcloud.mysql-client
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/snap/nextcloud/48/mysql/mysql.sock’ (2)
If I look at /var/snap/nextcloud I see a couple of directories, and their is a more recent one:
ubuntu@ubuntu-standard:/var/snap/nextcloud$ ls -rtl
total 16
drwxr-xr-x 3 root root 4096 Aug 24 04:05 common
drwxr-xr-x 8 root root 4096 Aug 24 04:05 48
drwxr-xr-x 8 root root 4096 Aug 24 04:05 136
drwxr-xr-x 8 root root 4096 Aug 24 04:05 128
lrwxrwxrwx 1 root root 3 Oct 17 17:10 current -> 136