Apache2+PHP-FPM 504 Gateway Timeout

Nextcloud version (eg, 20.0.5): 24.0.8
Operating system and version (eg, Ubuntu 20.04): Debian 11 Bullseye
Apache or nginx version (eg, Apache 2.4.25): 2.4.54-1
PHP version (eg, 7.4): 8.0

The issue you are facing:

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

Steps to replicate it:

  1. Open web-based updater
  2. Click on start update
  3. Gateway Timeout 504 occurs in Step 3. Create Backup

The output of your Nextcloud log in Admin > Logging:

nothing related to a timeout

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

<?php
$CONFIG = array (
  'instanceid' => '<REDACTED>',
  'passwordsalt' => '<REDACTED>',
  'secret' => '<REDACTED>',
  'trusted_domains' =>
  array (
    0 => '<REDACTED>',
    1 => '<REDACTED>',
  ),
  'datadirectory' => '/var/lib/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.8.2',
  'overwrite.cli.url' => 'https://<REDACTED>',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '<REDACTED>',
  'dbpassword' => '<REDACTED>',
  'default_phone_region' => 'DE',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '<REDACTED>',
  'mail_domain' => '<REDACTED>',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '<REDACTED>',
  'mail_smtpname' => '<REDACTED>',
  'mail_smtppassword' => '<REDACTED>',
  'mysql.utf8mb4' => true,
  'maintenance' => false,
  'theme' => '',
  'filelocking.enabled' => true,
  'filelocking.ttl' => 300,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 1.5,
  ),
  'log_rotate_size' => '10485760',
  'trashbin_retention_obligation' => 'auto, 28',
  'versions_retention_obligation' => 'auto, 365',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 3,
  'logdateformat' => 'F d, Y H:i:s',
  'mail_smtpport' => '587',
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'updater.release.channel' => 'stable',
  'updater.secret' => '<REDACTED>',
);

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

[Wed Jan 18 21:06:03.628414 2023] [proxy_fcgi:error] [pid 3028271:tid 140356892940032] (70007)The timeout specified has expired: [client <REDACTED>] AH01075: Error dispatching request to : (polling)

Output of web-based updater:

  • Create backup

Parsing response failed.
Show detailed response

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>504 Gateway Timeout</title>
</head><body>
<h1>Gateway Timeout</h1>
<p>The gateway did not receive a timely response
from the upstream server or application.</p>
</body></html>