File Upload Error

Hi Guys and Girls

Nextcloud version: 11.0.1.2
Operating system and version: Debian 8.7
Apache or nginx version: Apache 2.4.10
PHP version: 5.6.3
Is this the first time you’ve seen this error?: Yes

Can you reliably replicate it? (If so, please outline steps):

  1. Login to web frontend
  2. go to shared folder
  3. upload a file >500MB

The issue you are facing:

Every time I want to upload a File >500MB (yes the settings are adjusted to allow files up to 10GB) everything seems to work fine without any error on the web frontend. But afterwards I’m not able to find the file there. All I can see on the server side, is a xyz.part file, which is as big as the original file was.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"cOFItBe5fXH1JITkQGZu","remoteAddr":"some_IP","app":"no app in context","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,\\n\\t\\t\\t\\t\\t   `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`\\n\\t\\t\\t\\tFROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ?' with params [1, \\\"78ef7a26ccf7490e7941ba05fa2ae080\\\"]:\\n\\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away\",\"Code\":0,\"Trace\":\"#0 \\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(836): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT `fileid`...', Array)\\n#2 \\\path_to_nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(194): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT `fileid`...', Array, Array, NULL)\\n#3 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Cache.php(129): OC\\\\DB\\\\Connection->executeQuery('SELECT `fileid`...', Array)\\n#4 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/HomeCache.php(76): OC\\\\Files\\\\Cache\\\\Cache->get('files\\\/Multikopt...')\\n#5 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1289): OC\\\\Files\\\\Cache\\\\HomeCache->get('files\\\/Multikopt...')\\n#6 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1342): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/Multikopt...', '\\\/some_directory\\\/20...')\\n#7 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/HookConnector.php(144): OC\\\\Files\\\\View->getFileInfo('\\\/some_directory\\\/20...')\\n#8 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/HookConnector.php(88): OC\\\\Files\\\\Node\\\\HookConnector->getNodeForPath('\\\/some_directory\\\/20...')\\n#9 [internal function]: OC\\\\Files\\\\Node\\\\HookConnector->create(Array)\\n#10 \\\path_to_nextcloud\\\/lib\\\/private\\\/legacy\\\/hook.php(106): call_user_func(Array, Array)\\n#11 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(259): OC_Hook::emit('OC_Filesystem', 'create', Array)\\n#12 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(164): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->emitPreHooks(false)\\n#13 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(137): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #14)\\n#14 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1072): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('20170226_test_01....', Resource id #14)\\n#15 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('some_directory\\\/201...', Resource id #14, NULL)\\n#16 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#18 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#19 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#20 \\\path_to_nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#21 \\\path_to_nextcloud\\\/remote.php(165): require_once('\\\/data_1\\\/www\\\/nex...')\\n#22 {main}\",\"File\":\"\\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116}","level":3,"time":"2017-02-27T14:11:56+00:00","method":"PUT","url":"\/remote.php\/webdav\/some_directory\/20170226_test_01.MP4","user":"test","version":"11.0.1.2"}
{"reqId":"cOFItBe5fXH1JITkQGZu","remoteAddr":"some_IP","app":"no app in context","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,\\n\\t\\t\\t\\t\\t   `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`\\n\\t\\t\\t\\tFROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ?' with params [1, \\\"78ef7a26ccf7490e7941ba05fa2ae080\\\"]:\\n\\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away\",\"Code\":0,\"Trace\":\"#0 \\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(836): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT `fileid`...', Array)\\n#2 \\\path_to_nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(194): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT `fileid`...', Array, Array, NULL)\\n#3 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Cache.php(129): OC\\\\DB\\\\Connection->executeQuery('SELECT `fileid`...', Array)\\n#4 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/HomeCache.php(76): OC\\\\Files\\\\Cache\\\\Cache->get('files\\\/Multikopt...')\\n#5 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1289): OC\\\\Files\\\\Cache\\\\HomeCache->get('files\\\/Multikopt...')\\n#6 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1342): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/Multikopt...', '\\\/some_directory\\\/20...')\\n#7 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/HookConnector.php(144): OC\\\\Files\\\\View->getFileInfo('\\\/some_directory\\\/20...')\\n#8 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/HookConnector.php(78): OC\\\\Files\\\\Node\\\\HookConnector->getNodeForPath('\\\/some_directory\\\/20...')\\n#9 [internal function]: OC\\\\Files\\\\Node\\\\HookConnector->write(Array)\\n#10 \\\path_to_nextcloud\\\/lib\\\/private\\\/legacy\\\/hook.php(106): call_user_func(Array, Array)\\n#11 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(269): OC_Hook::emit('OC_Filesystem', 'write', Array)\\n#12 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(164): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->emitPreHooks(false)\\n#13 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(137): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #14)\\n#14 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1072): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('20170226_test_01....', Resource id #14)\\n#15 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('some_directory\\\/201...', Resource id #14, NULL)\\n#16 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#18 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#19 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#20 \\\path_to_nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#21 \\\path_to_nextcloud\\\/remote.php(165): require_once('\\\/data_1\\\/www\\\/nex...')\\n#22 {main}\",\"File\":\"\\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116}","level":3,"time":"2017-02-27T14:11:56+00:00","method":"PUT","url":"\/remote.php\/webdav\/some_directory\/20170226_test_01.MP4","user":"test","version":"11.0.1.2"}
{"reqId":"cOFItBe5fXH1JITkQGZu","remoteAddr":"some_IP","app":"webdav","message":"Exception: {\"Message\":\"An exception occurred while executing 'UPDATE `oc_file_locks` SET `lock` = -1, `ttl` = ? WHERE `key` = ? AND `lock` = 1' with params [1488208316, \\\"files\\\\\\\/76e7c6df3eae02d62c917e60ccd17ca9\\\"]:\\n\\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away\",\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Code\":0,\"Trace\":\"#0 \\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(996): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'UPDATE `oc_file...', Array)\\n#2 \\\path_to_nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(215): Doctrine\\\\DBAL\\\\Connection->executeUpdate('UPDATE `oc_file...', Array, Array)\\n#3 \\\path_to_nextcloud\\\/lib\\\/private\\\/Lock\\\/DBLockingProvider.php(230): OC\\\\DB\\\\Connection->executeUpdate('UPDATE `*PREFIX...', Array)\\n#4 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Common.php(698): OC\\\\Lock\\\\DBLockingProvider->changeLock('files\\\/76e7c6df3...', 2)\\n#5 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(610): OC\\\\Files\\\\Storage\\\\Common->changeLock('files\\\/Multikopt...', 2, Object(OC\\\\Lock\\\\DBLockingProvider))\\n#6 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(610): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->changeLock('files\\\/Multikopt...', 2, Object(OC\\\\Lock\\\\DBLockingProvider))\\n#7 \\\path_to_nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1936): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->changeLock('files\\\/Multikopt...', 2, Object(OC\\\\Lock\\\\DBLockingProvider))\\n#8 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Node.php(349): OC\\\\Files\\\\View->changeLock('\\\/some_directory\\\/20...', 2)\\n#9 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(170): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Node->changeLock(2)\\n#10 \\\path_to_nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(137): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #14)\\n#11 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1072): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('20170226_test_01....', Resource id #14)\\n#12 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('some_directory\\\/201...', Resource id #14, NULL)\\n#13 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#14 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#15 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#16 \\\path_to_nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 \\\path_to_nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#18 \\\path_to_nextcloud\\\/remote.php(165): require_once('\\\/data_1\\\/www\\\/nex...')\\n#19 {main}\",\"File\":\"\\\path_to_nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116,\"User\":\"test\"}","level":4,"time":"2017-02-27T14:11:56+00:00","method":"PUT","url":"\/remote.php\/webdav\/some_directory\/20170226_test_01.MP4","user":"test","version":"11.0.1.2"}
{"reqId":"Q4YJabFKHjHy1Dllxhh3","remoteAddr":"some_IP","app":"core","message":"Trusted domain error. \"some_IP\" tried to access using \"some_IP\" as host.","level":2,"time":"2017-02-27T14:24:01+00:00","method":"GET","url":"\/","user":"--","version":"11.0.1.2"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'some_id',
  'passwordsalt' => 'some_hash',
  'secret' => 'some_secret',
  'trusted_domains' =>
  array (
    0 => 'some_domain',
  ),
  'datadirectory' => 'path_to_nextcloud_data',
  'overwrite.cli.url' => 'some_url',
  'dbtype' => 'mysql',
  'version' => '11.0.1.2',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nc_user',
  'dbpassword' => 'some_password',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'some_adress',
  'mail_domain' => 'some_domain',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'loglevel' => 2,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

[Mon Feb 27 15:11:56.860504 2017] [:error] [pid 1490] [client some_IP:54427] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in path_to_nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91\nStack trace:\n#0 path_to_nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(91): PDOStatement->execute(NULL)\n#1 path_to_nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(987): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 path_to_nextcloud/lib/private/DB/Connection.php(215): Doctrine\\DBAL\\Connection->executeUpdate('UPDATE `oc_file...', Array, Array)\n#3 path_to_nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(208): OC\\DB\\Connection->executeUpdate('UPDATE `*PREFIX...', Array, Array)\n#4 path_to_nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(177): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 path_to_nextcloud/lib/private/Lock/DBLockingProvider.php(278): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 [internal func in path_to_nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 116

I’m no expert but nextcloud is losing connection to your MySQL database. Check your MySQL log file.

After normal user login i get the following entry:

2017-02-27 21:42:58 140253897317120 [ERROR] mysqld: Deadlock found when trying to get lock; try restarting transaction

I don’t know if this is usual, but I hope not.

And then I figured out another thing: I can upload a file which is 700MB without any problems. But the banner with the “time left” isn’t showing any correct time. e.g. 8 sec left at the beginning… And that happens always if the file is bigger than 500MB.

Anyway, after uploading the file which is 1.1GB there was the following entry in the mysql-error-log:

2017-02-27 22:10:49 140253897014016 [Warning] Aborted connection 112 to db: 'nextcloud_db' user: 'nc_user' host: 'localhost' (Got timeout reading communication packets)

Is that related to nextcloud or is that a setting from mysql? (I’m using mariadb 10.1)

The errors all appear to stem from the database. Questions:

  • Are you using socket or ip/localhost for the database?
  • Is the database local or remote?
  • Do the database logs show anything pertinent?
  • Do you see any memory errors?

I’m using maria 5 with no issues on a remote server. I’ve not tested 10 personally :slight_smile:

Hi Jason

I’m using a localhost connection, so the DB is localy installed.
The only thing i can see in the logfile, is what i’ve already posted above your posting.
I don’t think that there are any memory errors, since it’s a VM and the other stuff which is running on this host, is doing good so far.

OK, by memory errors I mean running out of memory - particularly as you run other things on it :slight_smile: You’d see a php memory exhausted error generally if that were the case though.

How does your sql log look?

There is plenty of memory available for this nextcloud instance. (about 4GB) The other services are running on other VMs.
Do you mean the sql log with all the sql queries in it?

The error logs.

2017-02-28  9:22:12 140639154006784 [Warning] Aborted connection 22 to db: 'nextcloud_db' user: 'nc_user' host: 'localhost' (Got timeout reading communication packets)

I get every time the same error.

Post your mysql config.

Based on the error that you posted…

It takes more than connect_timeout seconds to obtain a connect packet. See Section 6.1.5, “Server System Variables”.

1 Like

This is how my my.cnf File looks like.

# MariaDB database server configuration file.
#
# You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
lc_messages_dir	= /usr/share/mysql
lc_messages	= en_US
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
max_connections		= 100
connect_timeout		= 5
wait_timeout		= 600
max_allowed_packet	= 16M
thread_cache_size       = 128
sort_buffer_size	= 4M
bulk_insert_buffer_size	= 16M
tmp_table_size		= 32M
max_heap_table_size	= 32M
#
# * MyISAM
#
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched. On error, make copy and try a repair.
myisam_recover_options = BACKUP
key_buffer_size		= 128M
#open-files-limit	= 2000
table_open_cache	= 400
myisam_sort_buffer_size	= 512M
concurrent_insert	= 2
read_buffer_size	= 2M
read_rnd_buffer_size	= 1M
#
# * Query Cache Configuration
#
# Cache only tiny result sets, so we can fit more in the query cache.
query_cache_limit		= 128K
query_cache_size		= 64M
# for more write intensive setups, set to DEMAND or OFF
#query_cache_type		= DEMAND
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
general_log_file        = /var/log/mysql/mysql.log
general_log             = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
[mysqld_safe]
log_error=/var/log/mysql/mysql_error.log
 
[mysqld]
log_error=/var/log/mysql/mysql_error.log
#
# we do want to know about network errors and such
log_warnings		= 2
#
# Enable the slow query log to see queries with especially long duration
#slow_query_log[={0|1}]
slow_query_log_file	= /var/log/mysql/mariadb-slow.log
long_query_time = 10
#log_slow_rate_limit	= 1000
log_slow_verbosity	= query_plan

#log-queries-not-using-indexes
#log_slow_admin_statements
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#report_host		= master1
#auto_increment_increment = 2
#auto_increment_offset	= 1
log_bin			= /var/log/mysql/mariadb-bin
log_bin_index		= /var/log/mysql/mariadb-bin.index
# not fab for performance, but safer
#sync_binlog		= 1
expire_logs_days	= 10
max_binlog_size         = 100M
# slaves
#relay_log		= /var/log/mysql/relay-bin
#relay_log_index	= /var/log/mysql/relay-bin.index
#relay_log_info_file	= /var/log/mysql/relay-bin.info
#log_slave_updates
#read_only
#
# If applications support it, this stricter sql_mode prevents some
# mistakes like inserting invalid dates etc.
#sql_mode		= NO_ENGINE_SUBSTITUTION,TRADITIONAL
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
default_storage_engine	= InnoDB
# you can't just change log file size, requires special procedure
#innodb_log_file_size	= 50M
innodb_buffer_pool_size	= 256M
innodb_log_buffer_size	= 8M
innodb_file_per_table	= 1
innodb_open_files	= 400
innodb_io_capacity	= 400
innodb_flush_method	= O_DIRECT
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
binlog_format=mixed
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0

[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completion

[isamchk]
key_buffer		= 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

Post
mysqld --verbose --help

http://pastebin.com/raw/mNAbde1V

Is there anything I can do right now, to help you guys fixing my problem?
I’ve no clue what I should do to fix it, so I really need your help… please :slight_smile:

Try increasing connect_timeout = 5 please review the link that I posted earlier for more details.

There was no change after increasing connect_timeout.
So I changed the following in the nextcloud config:
‘dbdriveroptions’ =>
array (
1002 => ‘SET wait_timeout = 28800’,
),

Since then I don’t get any (Got timeout reading communication packets) Error.
But there is a new one:

{“reqId”:“Erxw2vvPOo5zMh0v94F2”,“remoteAddr”:“some_IP”,“app”:“webdav”,“message”:“Exception: {“Message”:“HTTP\/1.1 423 \“folder\/video.MP4\” is locked”,“Exception”:“OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked”,“Code”:0,“Trace”:”#0 \//path_to_nextcloud\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(137): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #14)\n#1 \/path_to_nextcloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1072): OCA\\DAV\\Connector\\Sabre\\Directory->createFile(‘video…’, Resource id #14)\n#2 \/path_to_nextcloud/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(525): Sabre\\DAV\\Server->createFile(‘folder\/201…’, Resource id #14, NULL)\n#3 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/path_to_nextcloud\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 \/path_to_nextcloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘method:PUT’, Array)\n#6 \//path_to_nextcloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#7 \/path_to_nextcloud\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(60): Sabre\\DAV\\Server->exec()\n#8 \//path_to_nextcloud\/nextcloud\/remote.php(165): require_once(’\//path_to_nextcloud\/nex…’)\n#9 {main}",“File”:"\/path_to_nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php",“Line”:175,“User”:“user”}",“level”:4,“time”:“2017-03-06T15:00:48+00:00”,“method”:“PUT”,“url”:"/remote.php/webdav/folder/video.MP4",“user”:“user”,“version”:“11.0.2.7”}

It looks like it is a different error now. :confused:

A New error is a good thing!
Error video.MP4 is locked

https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883

I am not expert or guru but i upgraded to https and i have been having the worst issues with my hosting. They “said” there was a kernel crash and now my nextclouds won’t do the following:

  1. Upload files - keep getting a server disconnection error
  2. Won’t recognize other Federated Cloud ID’s
  3. Wont sync with cell phones
    The only thing we can do with our next cloud NOW is login?! In the cpanel, I have noticed a lot more files?! They keep changing things at the backend, we take print screens because the web hosting keeps changing. For example, they changed the database for our website without telling us…then told us it was our IP fault?! That we couldn’t login…The hosting provider tells me to read the “security” warnings from softaculous??? I didn’t have this issue in times past?! We lost all of our pictures – everything they are not responding and people are yelling at us but we have a dedicated IP but a shared account if that sounds right?!
    Love this nextcloud…how can we get it back?! They totally mucked up our day with this one – we are next cloud addicts!
    Other than not offering this great tool, what are my options here?
    Ok, we uninstalled and reinstalled the application using a separate sub domain and is now getting the error “not acceptable” when uploading small jpeg images. We have unlimited storage – unlimited everything…

Hi,
I feel sorry for what happened to you.

For the best chances for you to receive help you should open a new thread instead of resurrecting this long-dead one.
Best thing is, to also provide information about software and versions. If accessible, please also provide log files and config (with confidential values removed!).

Thanks, I am new to this but learning quickly! …will comply I was looking for answers and didnt pay attention much to the date