如何解决Nextcloud升级Time-out?

Cloud storage

1 前言

一个问题,一篇文章,一出故事。
笔者最近升级NextCloud发现如下提示,

Step 3 is currently in process. Please reload this page later.

或者以下提示,

Create backup
Parsing response failed.
Show detailed response
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

2 最佳实践

2.1 错误分析

less /var/log/nginx/error.log

查看Nginx日志发现如下错误,

2024/06/07 09:25:42 [error] 430035#430035: *1037 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.168.0.10, server: nextcloud01.cmdschool.org, request: "POST /updater/index.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.cmdschool.org"

根据以上分析,可能问题出在Nginx连接php-fpm(fastcgi)时候超时。

2.2 错误修复

vim /etc/nginx/conf.d/nextcloud.conf

加入如下参数,

    location ~ \.php(?:$|/) {
        #...
        fastcgi_send_timeout 600s;
        fastcgi_read_timeout 600s;
    }

参数增加后,还需要使用如下命令重载服务,

systemctl reload php-fpm

参阅文档
===============
https://github.com/nextcloud/updater/issues/182

没有评论

发表回复

Cloud storage
如何配置Nextcloud集成Keycloak?

1 前言 一个问题,一篇文章,一出故事。 本章将在Nextcloud应用中使用Keycloak作为身 …

Cloud storage
如何修复NextCloud无错误日志输出的故障?

1 前言 一个问题,一篇文章,一出故事。 笔者升级NextCloud遇到如下错误, Internal …

Cloud storage
如何部署CentOS 8.5 nextCloud?

1 理论基础 1.1 项目简介 Nextcloud是一款开源免费的私有云存储网盘项目,可以让你快速便 …