Hello, i’m totally new here and i’m facing a problem for almost 4 days now, which i can’t resolve myself anymore. This is my first time trying to install Nextcloud with no success so far, since the website is not reachable (bad gateway). PHP is showing segmentation faults.
Nextcloud: 21.0.2
OS: Debian stretch 9.13 (32-bit) with custom kernel
Apache or nginx: nginx 1.10.3
PHP-fpm: 8.0.7
redis-server: 3.2.6
Restrictions:
- I only want to reach Nextcloud in my LAN network (IP: 192.168.178.115)
- I’m running debian on a custom kernel for the WD Mycloud Mirror
- System Memory is only 512MB (perhaps the main problem?) | CPU 1,2 GHz dual-core
Now the log files:
/var/log/nginx/nextcloud.error
2021/06/24 11:32:14 [error] 23006#23006: *1 open() "/var/www/nextcloud/favicon.ico" failed (2: No such file or directory), client: 192.168.178.73, server: wdmc, request: "GET /favicon.ico HTTP/1.1", host: "192.168.178.115", referrer: "http://192.168.178.115/index.php"
2021/06/24 11:32:14 [error] 23006#23006: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.178.73, server: wdmc, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "192.168.178.115", referrer: "http://192.168.178.115/index.php"
/var/log/php8.0-fpm.log
[24-Jun-2021 11:32:14] WARNING: [pool www] child 18916 exited on signal 11 (SIGSEGV) after 972.430477 seconds from start
[24-Jun-2021 11:32:14] NOTICE: [pool www] child 23008 started
I have no idea to further debug the segmentation fault. Perhaps i’m facing a memory issue with my system? Can you suggest me how to still get it running, since it’s the only hardware I have here.
Should i save memory with:
- downgrade Nextcloud?
- don’t use redis-server
- use apache2 instead of nginx
- free up memory on the debian system somehow?
Or doesn’t it matter at all which versions i use? Nextcloud will be the only thing running on this hardware, nothing else.
Now the configs:
/etc/nginx/conf.d/nextcloud.conf
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/run/php/php-fpm.sock;
}
server {
listen 80;
listen [::]:80;
server_name wdmc;
# Add headers to serve security related headers
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains;" always;
#I found this header is needed on Ubuntu, but not on Arch Linux.
add_header X-Frame-Options "SAMEORIGIN";
# Path to the root of your installation
root /var/www/nextcloud;
access_log /var/log/nginx/nextcloud.access;
error_log /var/log/nginx/nextcloud.error;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
# last;
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
location ~ /.well-known/acme-challenge {
allow all;
}
# set max upload size
client_max_body_size 512M;
fastcgi_buffers 64 4K;
# Disable gzip to avoid the removal of the ETag header
gzip off;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
try_files $fastcgi_script_name =404;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
}
/etc/php/8.0/fpm/php.ini
output_buffering = Off
memory_limit = 384M
/var/www/nextcloud/config/config.php
'activity_expire_days' => 14,
'auth.bruteforce.protection.enabled' => true,
'blacklisted_files' =>
array (
0 => '.htaccess',
1 => 'Thumbs.db',
2 => 'thumbs.db',
),
'cron_log' => true,
'default_phone_region' => 'DE',
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\Preview\PNG',
1 => 'OC\Preview\JPEG',
2 => 'OC\Preview\GIF',
3 => 'OC\Preview\BMP',
4 => 'OC\Preview\XBitmap',
5 => 'OC\Preview\Movie',
6 => 'OC\Preview\PDF',
7 => 'OC\Preview\MP3',
8 => 'OC\Preview\TXT',
9 => 'OC\Preview\MarkDown',
),
'filesystem_check_changes' => 0,
'filelocking.enabled' => 'true',
'htaccess.RewriteBase' => '/',
'integrity.check.disabled' => false,
'knowledgebaseenabled' => false,
'log_rotate_size' => 104857600,
'logfile' => '/var/www/nextcloud/nextcloud.log',
'loglevel' => 2,
'logtimezone' => 'Europe/Berlin',
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'preview_max_x' => 1024,
'preview_max_y' => 768,
'preview_max_scale_factor' => 1,
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'quota_include_external_storage' => false,
'share_folder' => '/Shares',
'skeletondirectory' => '',
'trashbin_retention_obligation' => 'auto, 7',
'activity_expire_days' => 14,
'auth.bruteforce.protection.enabled' => true,
'blacklisted_files' =>
array (
0 => '.htaccess',
1 => 'Thumbs.db',
2 => 'thumbs.db',
),
'cron_log' => true,
'default_phone_region' => 'DE',
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\Preview\PNG',
1 => 'OC\Preview\JPEG',
2 => 'OC\Preview\GIF',
3 => 'OC\Preview\BMP',
4 => 'OC\Preview\XBitmap',
5 => 'OC\Preview\Movie',
6 => 'OC\Preview\PDF',
7 => 'OC\Preview\MP3',
8 => 'OC\Preview\TXT',
9 => 'OC\Preview\MarkDown',
),
'filesystem_check_changes' => 0,
'filelocking.enabled' => 'true',
'htaccess.RewriteBase' => '/',
'integrity.check.disabled' => false,
'knowledgebaseenabled' => false,
'log_rotate_size' => 104857600,
'logfile' => '/daten/nextcloud.log',
'loglevel' => 2,
'logtimezone' => 'Europe/Berlin',
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'preview_max_x' => 1024,
'preview_max_y' => 768,
'preview_max_scale_factor' => 1,
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'quota_include_external_storage' => false,
'share_folder' => '/Shares',
'skeletondirectory' => '',
'trashbin_retention_obligation' => 'auto, 7',
'trusted_domains' =>
array (
0 => '192.168.178.115',
),
);