Connection keeps timing out while uploading

when i am uploading my files it keeps timing out. i don’t know how it happens and what i have to do.

I have installed nextcloud in the following way:
Raspberry pi 4 B 4G RAM
Ubuntu 22.04 LTS (GNU/Linux 5.15.0-1011-raspi aarch64)

sudo mkfs.ext4 -F /dev/sda1
sudo snap refresh
sudo snap install nextcloud
sudo mkdir /var/snap/nextcloud/common/nextcloud/data/
sudo mount /dev/sda1 /var/snap/nextcloud/common/nextcloud/data/
sudo nextcloud.manual-install user password
sudo nextcloud.occ config:system:set trusted_domains 1 --value=ip
sudo nextcloud.enable-https self-signed
sudo snap connect nextcloud:removable-media
sudo nextcloud.occ maintenance:mimetype:update-db
sudo nextcloud.occ maintenance:mimetype:update-js
sudo nextcloud.occ maintenance:theme:update

does someone know what to do?


I am not an expert so I may be wrong but i doubt if that is the right way of using external storage with snap.

I guess first one needs to install the snap NextCloud. Then use following command to connect the snap or allow snap to access external storage.

sudo snap connect nextcloud:removable-media

After which you may need to edit the configuration file,

sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php

To replace value in DataDiretory to input your external drive mount path.

Mounting location in mnt or else where wouldn’t be a problem.

Lastly use move command to move existing stuff from default snap data directory to your external mount location

sudo mv /var/snap/nextcloud/common/nextcloud/data /external/mount/location/path

Restart NextCloud


oke i will try that

I have tried your suggestion, but it still give the same error.
I have completely reinstalled my machine.

here is my config:

$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => 'oc7vn1l974km',
  'passwordsalt' => 'TfaBL0bz52YrurUgT4HTb+ZCtOoBI7',
  'secret' => '5kaU1HMSHgziFHwrciAuQQeKt3245zKTBEAiGIr8ti5pQtLI',
  'trusted_domains' =>
  array (
    0 => 'ip',
  'datadirectory' => '/media/data/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://ip',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'VKPKan5Oc2Kr5dYIEvXCHIEBOhiMJrd5to6uy5DjEc29szmfAJ_tRp2hswZaZ_N1',
  'installed' => true,

The files that i am uploading are around 400MB to 2.00GB

Version: 8.0.20

Memory limit: 512 MB

Max execution time: 3600

Upload max size: 16 GB

Extensions: Core, date, libxml, openssl, pcre, zlib, bcmath, bz2, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gmp, SPL, iconv, intl, json, ldap, mbstring, pcntl, PDO, session, posix, Reflection, standard, SimpleXML, mysqlnd, exif, tokenizer, xml, xmlreader, xmlwriter, zip, pdo_mysql, cgi-fcgi, redis, Zend OPcache

Type: mysql

Version: 8.0.29

Size: 4,2 MB