【问题标题】:503 Service Temporarily Unavailable after running an import-script运行导入脚本后 503 服务暂时不可用
【发布时间】:2019-10-11 05:03:03
【问题描述】:

我在装有 CentOS 7 的 Plesk 服务器(版本 17.8)上有一个域。Prestashop 安装在该域上,产品通过自编程模块导入。 当我开始导入时,我收到消息: 服务暂时不可用 由于停机时间或容量问题,服务器无法满足您的请求。请稍后再试。 Sportsams.ch 的网络服务器

在日志中,我收到以下消息:(70007) 已指定超时:AH01075:将请求分派到:

PHP setting for the domain:
PHP version: 7.2.18 with FPM
Memory_limit: 256M
max_execution_time: 1000
max_input_time: 1000
post_max_size: 16M
upload_max_filesize:16M

Plesk 的支持告诉我,这必须做出调整:

  1. Plesk> 域>sportsams.ch> Apache 和 nginx 设置。

  2. HTTP 的附加指令和 HTTPS 的附加指令:

    FcgidIdleTimeout 1200
    FcgidProcessLifeTime 1200
    FcgidConnectTimeout 1200
    FcgidIOTimeout 1200
    Timeout 1200
    ProxyTimeout 120
    
  3. 单击确定按钮应用更改

很遗憾,这些设置都没有成功。

我希望其他人能给我一个想法。

如果您需要更多信息,请告诉我。

Centos 7 Server with Plesk 17.8.
PHP-Version 7.2.18 With FPM

【问题讨论】:

    标签: php plesk http-status-code-503 plesk-onyx


    【解决方案1】:

    不确定这是否适用于您的 Plesk 配置,但我一直在使用以下配置通过 PrestaShop 和 Nginx 正确设置超时:

    location ~ .php$ {
        fastcgi_split_path_info ^(.+.php)(/.*)$;
        fastcgi_keep_conn on;
        include /etc/nginx/fastcgi_params;
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_read_timeout 3600;
        fastcgi_param PHP_VALUE open_basedir="/var/www/myshop.com/:/tmp/";
    }
    

    如果fastcgi_read_timeout 对您不起作用,则可能与托管服务提供商限制检测到您消耗过多资源有关。

    我希望这会有所帮助!

    【讨论】:

    • 对不起,我问了这么多,你能告诉我你在哪里添加这个配置吗?那我也可以试试,也许就是这样。
    • 当然,在 /etc/nginx/sites-enabled/myshop.com 但是我猜当您使用 Plesk 时位置会有所不同
    • 我在此文件夹中找到了文件:/etc/nginx/plesk.conf.d/vhosts/sportsams.ch.conf 我已添加此行并使用正确的路径修改最后一行店铺。我应该重新启动服务还是没有必要?
    • 您可以执行软重新加载 (systemctl reload nginx) 来重新加载配置。
    • 您好,设置完成后,我再次启动脚本。不幸的是,同样的错误又来了。
    猜你喜欢
    • 1970-01-01
    • 2018-08-18
    • 2018-02-25
    • 2011-12-19
    • 2018-09-16
    • 1970-01-01
    • 2016-01-27
    • 2019-12-29
    • 2013-10-31
    相关资源
    最近更新 更多