Discrepency between folder sizes macOS & NC

Hello everyone,

I have a quick question. I added a folder for syncing to my nextcloud client on Mac OS. The folder size is 230GB. NC is done syncing and shows me 214GB in the webgui and in the terminal.

I don’t quite know where to look or what to check.

Thanks in advance!

Nextcloud version (eg, 29.0.5): 28.0.5.1
Operating system and version (eg, Ubuntu 29.04): Armbian 24.5.1 bookworm
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.59-1
PHP version (eg, 8.3): PHP 8.1.29

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Login to webgui
  2. do something
  3. get logged out and prompted to login again

The output of your Nextcloud log in Admin > Logging:


[ nc-previews-auto ]
[ nc-limits ] (Sun Jun 23 07:02:27 PM CEST 2024)
+ configure
++ get_total_mem
+++ free -b
+++ sed -n 2p
+++ awk '{ print $2 }'
++ local total_mem=4186177536
++ local MAX_32BIT=4096000000
++ [[ aarch64 == \a\r\m\v\7 ]]
++ echo 4186177536
+ local TOTAL_MEM=4186177536
+ file /bin/bash
+ grep 64-bit
+ local AUTOMEM=3139633152
+ local require_fpm_restart=false
+ local CONF=/etc/php/8.1/fpm/conf.d/90-ncp.ini
++ cat /etc/php/8.1/fpm/conf.d/90-ncp.ini
+ local 'CONF_VALUE=; disable .user.ini files for performance and workaround NC update bugs
user_ini.filename =

; from Nextcloud .user.ini
upload_max_filesize=100G
post_max_size=100G
memory_limit=3139633152
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='\''UTF-8'\''
output_buffering=0

; slow transfers will be killed after this time
max_execution_time=3600
max_input_time=3600'
++ tmpl_php_max_memory
+++ get_total_mem
++++ free -b
++++ sed -n 2p
++++ awk '{ print $2 }'
+++ local total_mem=4186177536
+++ local MAX_32BIT=4096000000
+++ [[ aarch64 == \a\r\m\v\7 ]]
+++ echo 4186177536
++ local TOTAL_MEM=4186177536
+++ find_app_param nc-limits MEMORYLIMIT
+++ local script=nc-limits
+++ local param_id=MEMORYLIMIT
++++ basename nc-limits .sh
+++ local ncp_app=nc-limits
+++ local cfg_file=/usr/local/etc/ncp-config.d/nc-limits.cfg
++++ find_app_param_num nc-limits MEMORYLIMIT
++++ local script=nc-limits
++++ local param_id=MEMORYLIMIT
+++++ basename nc-limits .sh
++++ local ncp_app=nc-limits
++++ local cfg_file=/usr/local/etc/ncp-config.d/nc-limits.cfg
++++ [[ -f /usr/local/etc/ncp-config.d/nc-limits.cfg ]]
+++++ cat /usr/local/etc/ncp-config.d/nc-limits.cfg
++++ local 'cfg={
"id": "nc-limits",
"name": "Nc-limits",
"title": "nc-limits",
"description": "Configure system limits for NextcloudPi",
"info": "Examples: 200M or 2G. Write 0 for autoconfig",
"infotitle": "",
"params": [
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "100G",
"default": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "0",
"default": "0",
"suggest": "0"
},
{
"id": "PHPTHREADS",
"name": "PHP threads",
"value": "0",
"default": "0",
"suggest": "0"
},
{
"id": "REDISMEM",
"name": "Redis memory",
"value": "0",
"default": "0",
"suggest": "0"
}
]
}'
+++++ jq '.params | length'
++++ local len=4
++++ (( i = 0 ))
++++ (( i < len ))
+++++ jq -r '.params[0].id'
++++ local p_id=MAXFILESIZE
++++ [[ MEMORYLIMIT == \M\A\X\F\I\L\E\S\I\Z\E ]]
++++ (( i++ ))
++++ (( i < len ))
+++++ jq -r '.params[1].id'
++++ local p_id=MEMORYLIMIT
++++ [[ MEMORYLIMIT == \M\E\M\O\R\Y\L\I\M\I\T ]]
++++ echo 1
++++ return 0
+++ local p_num=1
+++ jq -r '.params[1].value'
++ local MEMORYLIMIT=0
++ [[ 0 == \0 ]]
++ echo -n 3139633152
+ echo 'Using 3139633152 for PHP max memory'
Using 3139633152 for PHP max memory
+ install_template php/90-ncp.ini.sh /etc/php/8.1/fpm/conf.d/90-ncp.ini
+ local template=php/90-ncp.ini.sh
+ local target=/etc/php/8.1/fpm/conf.d/90-ncp.ini
++ mktemp
+ local bkp=/tmp/tmp.2gaffdX4is
+ echo 'Installing template '\''php/90-ncp.ini.sh'\''...'
Installing template 'php/90-ncp.ini.sh'...
++ dirname /etc/php/8.1/fpm/conf.d/90-ncp.ini
+ mkdir -p /etc/php/8.1/fpm/conf.d
+ [[ -f /etc/php/8.1/fpm/conf.d/90-ncp.ini ]]
+ cp -a /etc/php/8.1/fpm/conf.d/90-ncp.ini /tmp/tmp.2gaffdX4is
+ [[ '' == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/php/90-ncp.ini.sh
+ rm /tmp/tmp.2gaffdX4is
++ cat /etc/php/8.1/fpm/conf.d/90-ncp.ini
+ [[ ; disable .user.ini files for performance and workaround NC update bugs
user_ini.filename =

; from Nextcloud .user.ini
upload_max_filesize=100G
post_max_size=100G
memory_limit=3139633152
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0

; slow transfers will be killed after this time
max_execution_time=3600
max_input_time=3600 == \;\ \d\i\s\a\b\l\e\ \.\u\s\e\r\.\i\n\i\ \f\i\l\e\s\ \f\o\r\ \p\e\r\f\o\r\m\a\n\c\e\ \a\n\d\ \w\o\r\k\a\r\o\u\n\d\ \N\C\ \u\p\d\a\t\e\ \b\u\g\s\
\u\s\e\r\_\i\n\i\.\f\i\l\e\n\a\m\e\ \=\
\
\;\ \f\r\o\m\ \N\e\x\t\c\l\o\u\d\ \.\u\s\e\r\.\i\n\i\
\u\p\l\o\a\d\_\m\a\x\_\f\i\l\e\s\i\z\e\=\1\0\0\G\
\p\o\s\t\_\m\a\x\_\s\i\z\e\=\1\0\0\G\
\m\e\m\o\r\y\_\l\i\m\i\t\=\3\1\3\9\6\3\3\1\5\2\
\m\b\s\t\r\i\n\g\.\f\u\n\c\_\o\v\e\r\l\o\a\d\=\0\
\a\l\w\a\y\s\_\p\o\p\u\l\a\t\e\_\r\a\w\_\p\o\s\t\_\d\a\t\a\=\-\1\
\d\e\f\a\u\l\t\_\c\h\a\r\s\e\t\=\'\U\T\F\-\8\'\
\o\u\t\p\u\t\_\b\u\f\f\e\r\i\n\g\=\0\
\
\;\ \s\l\o\w\ \t\r\a\n\s\f\e\r\s\ \w\i\l\l\ \b\e\ \k\i\l\l\e\d\ \a\f\t\e\r\ \t\h\i\s\ \t\i\m\e\
\m\a\x\_\e\x\e\c\u\t\i\o\n\_\t\i\m\e\=\3\6\0\0\
\m\a\x\_\i\n\p\u\t\_\t\i\m\e\=\3\6\0\0 ]]
+ local CONF=/etc/php/8.1/fpm/pool.d/www.conf
++ cat /etc/php/8.1/fpm/pool.d/www.conf
+ CONF_VALUE='[www]
user = www-data
group = www-data
listen = /run/php/php8.1-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = static
pm.max_children = 39
pm.start_servers = 4
pm.min_spare_servers = 4
pm.max_spare_servers = 8
pm.status_path = /status
slowlog = log/$pool.log.slow'
++ tmpl_php_threads
+++ get_total_mem
++++ free -b
++++ sed -n 2p
++++ awk '{ print $2 }'
+++ local total_mem=4186177536
+++ local MAX_32BIT=4096000000
+++ [[ aarch64 == \a\r\m\v\7 ]]
+++ echo 4186177536
++ local TOTAL_MEM=4186177536
+++ find_app_param nc-limits PHPTHREADS
+++ local script=nc-limits
+++ local param_id=PHPTHREADS
++++ basename nc-limits .sh
+++ local ncp_app=nc-limits
+++ local cfg_file=/usr/local/etc/ncp-config.d/nc-limits.cfg
++++ find_app_param_num nc-limits PHPTHREADS
++++ local script=nc-limits
++++ local param_id=PHPTHREADS
+++++ basename nc-limits .sh
++++ local ncp_app=nc-limits
++++ local cfg_file=/usr/local/etc/ncp-config.d/nc-limits.cfg
++++ [[ -f /usr/local/etc/ncp-config.d/nc-limits.cfg ]]
+++++ cat /usr/local/etc/ncp-config.d/nc-limits.cfg
++++ local 'cfg={
"id": "nc-limits",
"name": "Nc-limits",
"title": "nc-limits",
"description": "Configure system limits for NextcloudPi",
"info": "Examples: 200M or 2G. Write 0 for autoconfig",
"infotitle": "",
"params": [
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "100G",
"default": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "0",
"default": "0",
"suggest": "0"
},
{
"id": "PHPTHREADS",
"name": "PHP threads",
"value": "0",
"default": "0",
"suggest": "0"
},
{
"id": "REDISMEM",
"name": "Redis memory",
"value": "0",
"default": "0",
"suggest": "0"
}
]
}'
+++++ jq '.params | length'
++++ local len=4
++++ (( i = 0 ))
++++ (( i < len ))
+++++ jq -r '.params[0].id'
++++ local p_id=MAXFILESIZE
++++ [[ PHPTHREADS == \M\A\X\F\I\L\E\S\I\Z\E ]]
++++ (( i++ ))
++++ (( i < len ))
+++++ jq -r '.params[1].id'
++++ local p_id=MEMORYLIMIT
++++ [[ PHPTHREADS == \M\E\M\O\R\Y\L\I\M\I\T ]]
++++ (( i++ ))
++++ (( i < len ))
+++++ jq -r '.params[2].id'
++++ local p_id=PHPTHREADS
++++ [[ PHPTHREADS == \P\H\P\T\H\R\E\A\D\S ]]
++++ echo 2
++++ return 0
+++ local p_num=2
+++ jq -r '.params[2].value'
++ local PHPTHREADS=0
++ [[ 0 -eq 0 ]]
++ PHPTHREADS=39
++ [[ 39 -lt 16 ]]
++ echo -n 39
+ echo 'Using 39 PHP threads'
Using 39 PHP threads
+ install_template php/pool.d.www.conf.sh /etc/php/8.1/fpm/pool.d/www.conf
+ local template=php/pool.d.www.conf.sh
+ local target=/etc/php/8.1/fpm/pool.d/www.conf
++ mktemp
+ local bkp=/tmp/tmp.a6ymo0fP3v
+ echo 'Installing template '\''php/pool.d.www.conf.sh'\''...'
Installing template 'php/pool.d.www.conf.sh'...
++ dirname /etc/php/8.1/fpm/pool.d/www.conf
+ mkdir -p /etc/php/8.1/fpm/pool.d
+ [[ -f /etc/php/8.1/fpm/pool.d/www.conf ]]
+ cp -a /etc/php/8.1/fpm/pool.d/www.conf /tmp/tmp.a6ymo0fP3v
+ [[ '' == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/php/pool.d.www.conf.sh
+ rm /tmp/tmp.a6ymo0fP3v
++ cat /etc/php/8.1/fpm/pool.d/www.conf
+ [[ [www]
user = www-data
group = www-data
listen = /run/php/php8.1-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = static
pm.max_children = 39
pm.start_servers = 4
pm.min_spare_servers = 4
pm.max_spare_servers = 8
pm.status_path = /status
slowlog = log/$pool.log.slow == \[\w\w\w\]\
\u\s\e\r\ \=\ \w\w\w\-\d\a\t\a\
\g\r\o\u\p\ \=\ \w\w\w\-\d\a\t\a\
\l\i\s\t\e\n\ \=\ \/\r\u\n\/\p\h\p\/\p\h\p\8\.\1\-\f\p\m\.\s\o\c\k\
\l\i\s\t\e\n\.\o\w\n\e\r\ \=\ \w\w\w\-\d\a\t\a\
\l\i\s\t\e\n\.\g\r\o\u\p\ \=\ \w\w\w\-\d\a\t\a\
\p\m\ \=\ \s\t\a\t\i\c\
\p\m\.\m\a\x\_\c\h\i\l\d\r\e\n\ \=\ \3\9\
\p\m\.\s\t\a\r\t\_\s\e\r\v\e\r\s\ \=\ \4\
\p\m\.\m\i\n\_\s\p\a\r\e\_\s\e\r\v\e\r\s\ \=\ \4\
\p\m\.\m\a\x\_\s\p\a\r\e\_\s\e\r\v\e\r\s\ \=\ \8\
\p\m\.\s\t\a\t\u\s\_\p\a\t\h\ \=\ \/\s\t\a\t\u\s\
\s\l\o\w\l\o\g\ \=\ \l\o\g\/\$\p\o\o\l\.\l\o\g\.\s\l\o\w ]]
+ local CONF=/etc/mysql/mariadb.conf.d/91-ncp.cnf
++ cat /etc/mysql/mariadb.conf.d/91-ncp.cnf
+ CONF_VALUE='[mysqld]
transaction_isolation = READ-COMMITTED
innodb_large_prefix=true
innodb_file_per_table=1
innodb_file_format=barracuda
max_allowed_packet=256M

[server]
# innodb settings
skip-name-resolve
innodb_buffer_pool_size = 996212736
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
innodb_log_file_size = 32M

# disable query cache
query_cache_type = 0
query_cache_size = 0

# other
tmp_table_size= 64M
max_heap_table_size= 64M'
+ install_template mysql/91-ncp.cnf.sh /etc/mysql/mariadb.conf.d/91-ncp.cnf
+ local template=mysql/91-ncp.cnf.sh
+ local target=/etc/mysql/mariadb.conf.d/91-ncp.cnf
++ mktemp
+ local bkp=/tmp/tmp.al6un7hYIm
+ echo 'Installing template '\''mysql/91-ncp.cnf.sh'\''...'
Installing template 'mysql/91-ncp.cnf.sh'...
++ dirname /etc/mysql/mariadb.conf.d/91-ncp.cnf
+ mkdir -p /etc/mysql/mariadb.conf.d
+ [[ -f /etc/mysql/mariadb.conf.d/91-ncp.cnf ]]
+ cp -a /etc/mysql/mariadb.conf.d/91-ncp.cnf /tmp/tmp.al6un7hYIm
+ [[ '' == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/mysql/91-ncp.cnf.sh
+ rm /tmp/tmp.al6un7hYIm
++ cat /etc/mysql/mariadb.conf.d/91-ncp.cnf
+ [[ [mysqld]
transaction_isolation = READ-COMMITTED
innodb_large_prefix=true
innodb_file_per_table=1
innodb_file_format=barracuda
max_allowed_packet=256M

[server]
# innodb settings
skip-name-resolve
innodb_buffer_pool_size = 996212736
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
innodb_log_file_size = 32M

# disable query cache
query_cache_type = 0
query_cache_size = 0

# other
tmp_table_size= 64M
max_heap_table_size= 64M == \[\m\y\s\q\l\d\]\
\t\r\a\n\s\a\c\t\i\o\n\_\i\s\o\l\a\t\i\o\n\ \=\ \R\E\A\D\-\C\O\M\M\I\T\T\E\D\
\i\n\n\o\d\b\_\l\a\r\g\e\_\p\r\e\f\i\x\=\t\r\u\e\
\i\n\n\o\d\b\_\f\i\l\e\_\p\e\r\_\t\a\b\l\e\=\1\
\i\n\n\o\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+ service redis-server restart

System config value trusted_domains => 3 set to string cloud.letsgolaser.org
System config value overwrite.cli.url set to string https://cloud.letsgolaser.org/

[ nc-previews-auto ]

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

<?php
$CONFIG = array (
 'passwordsalt' => '***************************',
 'secret' => '***************************************',
 'trusted_domains' => 
 array (
   0 => 'localhost',
   7 => 'nextcloudpi',
   5 => 'nextcloudpi.local',
   8 => 'nextcloudpi.lan',
   3 => '***********',
   11 => '***********',
   1 => '***********',
   14 => 'nextcloudpi',
   20 => '***********',
 ),
 'datadirectory' => '/opt/ncdata/data',
 'dbtype' => 'mysql',
 'version' => '28.0.5.1',
 'overwrite.cli.url' => '***********',
 'dbname' => 'nextcloud',
 'dbhost' => 'localhost',
 'dbport' => '',
 'dbtableprefix' => 'oc_',
 'mysql.utf8mb4' => true,
 'dbuser' => 'ncadmin',
 'dbpassword' => '***********',
 'installed' => true,
 'instanceid' => '***********',
 'memcache.local' => '\\OC\\Memcache\\Redis',
 'memcache.locking' => '\\OC\\Memcache\\Redis',
 'redis' => 
 array (
   'host' => '/var/run/redis/redis.sock',
   'port' => 0,
   'timeout' => 0.0,
   'password' => '***********',
 ),
 'tempdirectory' => '/opt/ncdata/data/tmp',
 'mail_smtpmode' => 'sendmail',
 'mail_smtpauthtype' => 'LOGIN',
 'mail_from_address' => 'noreply',
 'mail_domain' => 'nextcloudpi.com',
 'preview_max_x' => '2048',
 'preview_max_y' => '2048',
 'jpeg_quality' => '60',
 'overwriteprotocol' => 'https',
 'maintenance' => false,
 'logfile' => '/opt/ncdata/data/nextcloud.log',
 'trusted_proxies' => 
 array (
   11 => '127.0.0.1',
   12 => '::1',
   14 => '192.168.178.72
192.168.178.73',
 ),
 'loglevel' => '2',
 'log_type' => 'file',
 'htaccess.RewriteBase' => '/',
 'data-fingerprint' => '***********',
);

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

[Mon Jun 24 02:43:05.768360 2024] [authz_host:error] [pid 7208:tid 281472367391008] [client 205.210.31.174:65010] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Mon Jun 24 02:43:05.768435 2024] [authz_core:error] [pid 7208:tid 281472367391008] [client 205.210.31.174:65010] AH01630: client denied by server configuration: /var/www/ncp-web/

The short answer: 230 GB = 214 GiB

They’re not the same, but they’re often used interchangeably. It can get confusing, because different OSes and apps (and sometimes the same ones in different contexts) report things differently or interchangeably.

Thank you!

I compared the hashes of all files. They’re the same!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.