Hi, Im trying to setup nextcloud on my brandnew Raspberry Pi 8GB but getting an error on the initial setup after nc-limit on the restart of the maria DB telling me that it can not allocate memory.
I have installed Hypriot on my fresh RPI4 and entered following command for setting up the container:
docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /mnt/CarazzaIII/nextcloud:/data --name nextcloudpi ownyourbits/nextcloudpi-armhf $192.168.2.100
Here is the log im getting from it:
Initializing empty volume..
Making /usr/local/etc/ncp-config.d persistent ...
Making /etc/services-enabled.d persistent ...
Making /etc/letsencrypt persistent ...
Making /etc/shadow persistent ...
Making /etc/cron.d persistent ...
Making /etc/cron.daily persistent ...
Making /etc/cron.hourly persistent ...
Making /etc/cron.weekly persistent ...
Making /usr/local/bin persistent ...
Making /etc/apache2 persistent ...
Starting PHP-fpm
Starting Apache
Starting mariaDB
2020-07-12 5:21:09 0 [Note] mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 101 ...
Starting Redis
Starting Cron
Starting Postfix
Uninitialized instance, running nc-init...
Running nc-init
Setting up a clean Nextcloud instance... wait until message 'NC init done'
Setting up database...
Setting up Nextcloud...
Nextcloud was successfully installed
Set mode for background jobs to 'cron'
System config value tempdirectory set to string /var/www/nextcloud/data/tmp
System config value mysql.utf8mb4 set to boolean true
System config value trusted_domains => 11 set to string 87.102.170.96
System config value trusted_domains => 1 set to string 172.17.0.2
System config value trusted_domains => 5 set to string nextcloudpi.local
System config value trusted_domains => 7 set to string nextcloudpi
System config value trusted_domains => 8 set to string nextcloudpi.lan
System config value mail_smtpmode set to string sendmail
System config value mail_smtpauthtype set to string LOGIN
System config value mail_from_address set to string admin
System config value mail_domain set to string ownyourbits.com
nextcloudpi enabled
calendar installed
calendar enabled
contacts installed
contacts enabled
notes installed
notes enabled
tasks installed
tasks enabled
news installed
news enabled
calendar enabled
contacts enabled
notes enabled
tasks enabled
news enabled
previewgenerator enabled
Config value squareSizes for app previewgenerator set to 32 256
Config value widthSizes for app previewgenerator set to 256 384
Config value heightSizes for app previewgenerator set to 256
System config value preview_max_x set to string 2048
System config value preview_max_y set to string 2048
System config value jpeg_quality set to string 60
Config value jpeg_quality for app preview set to 60
System config value overwriteprotocol set to string https
Following columns will be updated:
* mounts.storage_id
* mounts.root_id
* mounts.mount_id
This can take up to hours, depending on the number of files in your instance!
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Adding calendarobject_calid_index index to the calendarobjects_props table, this can take some time...
calendarobjects_props table updated successfully.
Check indices of the schedulingobjects table.
Adding schedulobj_principuri_index index to the schedulingobjects table, this can take some time...
schedulingobjects table updated successfully.
NC init done
System config value trusted_domains => 1 set to string 172.17.0.2
System config value trusted_domains => 6 set to string 92.168.2.100
Provisioning
Provisioning Redis password
Updating NextCloud config with Redis password
Provisioning MariaDB password
Updating NextCloud config with MariaDB password
Running nc-limits
Using 6304066560B for PHP
Using 4 PHP threads
Using 3362168832 memory for the database
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
Init done
And here is the log i get from MariaDB startup when i try to manually restart:
2020-07-12 5:28:52 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-forma
t/
2020-07-12 5:28:52 0 [Note] InnoDB: Using Linux native AIO
2020-07-12 5:28:52 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-12 5:28:52 0 [Note] InnoDB: Uses event mutexes
2020-07-12 5:28:52 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-12 5:28:52 0 [Note] InnoDB: Number of pools: 1
2020-07-12 5:28:52 0 [Note] InnoDB: Using generic crc32 instructions
2020-07-12 5:28:52 0 [Note] InnoDB: Initializing buffer pool, total size = 3.25G, instances = 1, chunk size = 128M
2020-07-12 5:28:52 0 [ERROR] InnoDB: mmap(136118272 bytes) failed; errno 12
2020-07-12 5:28:52 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2020-07-12 5:28:52 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-07-12 5:28:52 0 [Note] InnoDB: Starting shutdown...
double free or corruption (out)
200712 5:28:53 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.3.22-MariaDB-0+deb10u1
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466218 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /data/database
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes unlimited unlimited processes
Max open files 1048576 1048576 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 63600 63600 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: core
I have tried to reduce the amount on memory but it resets the value after reboot. Also i tried to reduce the max memory with nc-limits also with no success. Furthermore i tried to update to the latest version hoping there was a bugfix (docker exec -it nextcloudpi ncp-update).
Im now googling for a solution since 2 days. I have found an entry in the github issue-Page with the exact same problem so i think im not the only one with that problem, but there is not a good solution for it.
https://github.com/nextcloud/nextcloudpi/issues/1141
SD Card is also new and im using the official Pi4 power supply
So now im out of ideas an I hope one of you guys can help me out here
Big thank in advance for helping me