Describe the solution you'd like
Better handling of /tmp space that doesnt result in out-of-disk-space errors on large files from external_storage
Describe alternatives you've considered
Requesting the nextcloud-aio team implement controls on /tmp (see discussion 5356 aboe)
Additional context
Steps to reproduce
Setup Nextcloud memories
index any file on external_storage larger then 50% of your free disk space occ memories:index
_Note: It appears this process copies the file from externalstorage, to /tmp and then copies it again in /tmp using 2x the filesize while processing
This file grows until it eventually fills my entire partition (~50GB)
54d900c19b86:/var/www/html# ls -lha /tmp/phpgABoHh
-rw------- 1 www-data www-data 26G Oct 1 00:15 /tmp/phpgABoHh
Expected behavior
Better handling on whatever that tmp file is by the memories app!
Better protections/limits on /tmp by nextlcoud-aio
Actual behavior
Filesystem fills up
database crashes
database container is left hanging in nextcloud network space (requiring system docker restart)
Upon restart, /tmp in the nextcloud-aio-nextcloud container is cleared and everything works until the rescan fills the filesystem again :)
Indexing folder /XXXXX/files/nas_photoAlbums
PHP Notice: fwrite(): Write of 331 bytes failed with errno=28 No space left on device in /var/www/html/lib/private/Log/File.php on line 87
Failed to index folder /XXXXX/files/nas_photoAlbums: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 no connection to the server
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 no connection to the server
PHP Notice: fwrite(): Write of 331 bytes failed with errno=28 No space left on device in /var/www/html/lib/private/Log/File.php on line 87
Error response from daemon: endpoint with name nextcloud-aio-database "already exists in network nextcloud-aio"
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at "nextcloud-aio-database" (172.18.0.5), port 5432 failed: Host is unreachable
Is the server running on that host and accepting TCP/IP connections? in /var/www/html/lib/private/DB/Connection.php:167
My workaround: I've increased the /var/lib/docker partition to be > 2x the largest file I have on external_storage. This however took a lot of time to debug, error handling/logging could be improved to better show the user the issue. Hoping between this team and the nextcloud-aio team the next user with this issue can debug much faster :)
Is your feature request related to a problem? Please describe. Related to: https://github.com/nextcloud/all-in-one/discussions/5356
Describe the solution you'd like Better handling of /tmp space that doesnt result in out-of-disk-space errors on large files from external_storage
Describe alternatives you've considered Requesting the nextcloud-aio team implement controls on /tmp (see discussion 5356 aboe)
Additional context
Steps to reproduce
occ memories:index
_Note: It appears this process copies the file from externalstorage, to /tmp and then copies it again in /tmp using 2x the filesize while processingsudo docker exec -it nextcloud-aio-nextcloud /bin/bash
watch 'ls -lha /tmp;'
This file grows until it eventually fills my entire partition (~50GB)
Expected behavior
Actual behavior
Filesystem fills up database crashes database container is left hanging in nextcloud network space (requiring system docker restart) Upon restart, /tmp in the nextcloud-aio-nextcloud container is cleared and everything works until the rescan fills the filesystem again :)
Error response from daemon: endpoint with name nextcloud-aio-database "already exists in network nextcloud-aio"
My workaround: I've increased the /var/lib/docker partition to be > 2x the largest file I have on external_storage. This however took a lot of time to debug, error handling/logging could be improved to better show the user the issue. Hoping between this team and the nextcloud-aio team the next user with this issue can debug much faster :)
Other information
Host OS
Ubuntu 24.04
Nextcloud Hub 8 (29.0.7)
Output of
sudo docker info
Docker run command or docker-compose file that you used
Other valuable info