'Connection Timeout' for backup during update

The Basics

Nextcloud Server version (e.g., 29.x.x):
    28.0.5
Operating system and version (e.g., Ubuntu 24.04):
    Linux kernel 5.14.0-427.31.1.el9_4.x86_64
Web server and version (e.g, Apache 2.4.25):
    Apache 2.4.62
Reverse proxy and version _(e.g. nginx 1.27.2)
    Unknown, but I can ask.
PHP version (e.g, 8.3):
    8.1
Is this the first time you’ve seen this error? (Yes / No):
    No
When did this problem seem to first start?
    With every attempt to upgrade from 28.0.5
Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    Softaculous
Are you using CloudfIare, mod_security, or similar? (Yes / No)
    Unknown, but I can find out.

Summary of the issue you are facing:

The updater from version 28.0.5 to 28.0.14 gets to the backup step and stop, complaining:

Create backup
Parsing response failed.
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

If I’ve understood the problem then I think I’m looking for a way to extent the time limit for the script.

My hosting service (chosting.dk) has pointed me to edit .htaccess and remove the time limit for the script that’s timing out. So here’s my problem, which script should I point to and which .htaccess file should I edit? There is both an .htaccess file in /public_html and in /public_html/ncstage. I’ve tried with both using the edit below both specific to the /updater/index.php script and as a wildcard.

<IfModule Litespeed> 
    RewriteEngine On
    RewriteRule /ncstage/updater/index.php - [E=noabort:1, E=noconntimeout:1]
#    RewriteRule .* - [E=noabort:1, E=noconntimeout:1]
</IfModule>

Steps to replicate it (hint: details matter!):

Every try to update from 28.0.5

Log entries

Nextcloud

There are no log entries generated during these attempts to upgrade

Web Browser

unlikely cause

Web server / Reverse Proxy

I have no directory called ńginx

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '[REDACTED]',
  'passwordsalt' => '[REDACTED]',
  'secret' => '[REDACTED]',
  'trusted_domains' => 
  array (
    0 => '[REDACTED]',
  ),
  'datadirectory' => '/home/[REDACTED]/ncstagedata',
  'dbtype' => 'mysql',
  'version' => '28.0.5.1',
  'overwrite.cli.url' => 'https://[REDACTED]',
  'dbname' => '[REDACTED]',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '[REDACTED]',
  'dbpassword' => '[REDACTED]',
  'installed' => true,
  'maintenance' => false,
  'trashbin_retention_obligation' => '28, 28',
  'default_phone_region' => 'DK',
  'logfile' => '/var/log/nextcloud.log',
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => '[REDACTED]',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.[REDACTED].com',
  'mail_smtpport' => '587',
  'mail_smtpname' => '[REDACTED]',
  'mail_smtppassword' => '[REDACTED]',
  'updater.secret' => '[REDACTED]',
);

Apps

Nothing non-standard. Not sure how to get a proper list.

In conclusion

Thanks for getting this far, any help i appreciated. Let me know if I’ve missed anything out or if there’s somewhere I sould have been able to look up the solution.
:slight_smile:

Run the Updater from the command-line. There will be no timeout impact from your web infrastructure.

Also see Updater: Troubleshooting.

Hi @jtr thanks. I’m really struggling to get SSH access to work. I assume that’s what I need to get working in order to run a command?

It’s so long since I’ve had to deal with SSH & Putty.

I got past this connection timeout error by using my webhosts ssh shell (which is part of cpanel). Here are a few points to note for any future readers:

Changing [E=noabort:1, E=noconntimeout:1] in all of the files below made no difference. Here ncstage is my installation directory and public_html is what is often called www:

/public_html/.htaccess
/public_html/ncstage/.htaccess
/home/[REDACTED]/ncstagedata/.htaccess

The command given in the docs (Upgrade via built-in updater — Nextcloud latest Administration Manual latest documentation) for running an update in the terminal is sudo -u www-data php /var/www/nextcloud/updater/updater.phar. That will not work in my case, but the docs give no general guidance on what to do.

In my case the terminal user has the necessary rights (no need to use sudo, which is not available anyway since it would be a huge security problem). The command is simply

php /public_html/ncstage/updater/updater.phar

So, making progress! Now it stops with

[ ] Verify integrity ...[[REDACTED]@server12 updater]$

… yes, it has enough memory allocated, more than it requests … but that’s a topic for a new post.

My original problem is perhaps not solved, but worked around.

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