Nextcloud version (eg, 20.0.5): 22.2.5.1
Operating system and version (eg, Ubuntu 20.04): debian 10.12
Apache or nginx version (eg, Apache 2.4.25): nginx 1.14.2
PHP version (eg, 7.4): PHP 7.3.31-1~deb10u1
The issue you are facing:
When I want to login (from my computer) on my instance, I got a `504 Gateway Time-out from nginx.
The very strange things is : My calendar, albums and shared links still work and are accessible perfectly.
It seems that the 504 only occurs on the /login/ page.
Accessing my instance via the android application also works as normal.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Go on the public url (leads to /login page) via computer browser (several tested, but Firefox mainly used)
- Enter credentials
- Got the 504 error
The output of your Nextcloud log in Admin > Logging:
not accessible
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => 'xxx',
),
'datadirectory' => '/var/www/cloud/data',
'dbtype' => 'mysql',
'version' => '22.2.5.1',
'overwrite.cli.url' => 'https://xxx',
'dbname' => 'xxx',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'xxx',
'installed' => true,
'maintenance' => false,
'mail_from_address' => 'cloud',
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'xxx',
'mail_smtpauthtype' => 'PLAIN',
'mail_smtphost' => 'xxx',
'mail_smtpport' => '587',
'mail_smtpauth' => 1,
'mail_smtpname' => 'xxx',
'mail_smtppassword' => 'xxx',
'updater.secret' => 'xxx,
'theme' => '',
'loglevel' => 2,
'has_rebuilt_cache' => true,
);
The output of nginx error log in `/var/log/nginx/error.log:
2022/03/31 00:00:27 [error] 12799#12799: *1200077 upstream timed out (110: Connection timed out) while reading response header from upstream, client: x.x.x.x, server: xxx , request: "POST /login HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock", host: "xxx"
Partial copy of the site-enabled config in nginx (if needed, I can provide full copy):
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_param proxy_read_timeout 3600; # Trying to solve 504 issue
fastcgi_param proxy_send_timeout 3600; # Trying to solve 504 issue
}