【问题标题】:Laravel Error 503 Service Unavailable ServiceLaravel 报错 503 服务不可用 服务
【发布时间】:2018-07-08 21:56:11
【问题描述】:

错误 503 服务不可用 服务不可用

上师冥想: 西ID:5312211

清漆缓存服务器

我在 cpanel 和子域上工作,但我从 laravel 项目中得到了这个错误。你能帮我解决这个问题吗? 我使用 cpanel 和 laravel 5.5

【问题讨论】:

    标签: php laravel server cpanel


    【解决方案1】:

    看起来您运行的是 artisan down 命令,而不是 up 命令。 运行:

    php artisan up
    

    然后你会得到:

    “应用程序现已上线。”

    【讨论】:

    • 出于好奇,php artisan down 命令将文件写入storage/framework/down,该文件的存在表明存在问题。相反,php artisan up 删除上述文件。
    【解决方案2】:

    如果尝试了php artisan up 命令并且您的站点仍然无法启动并给出503,那么,

    删除/storage/framework/内的down文件

    【讨论】:

      【解决方案3】:

      我在 Cpanel 中遇到了同样的问题,我已经解决了这个问题。

      我刚刚将 PHP 版本修复为最新 然后我转到“面板中的外壳选项”并输入此命令,我的应用程序现已上线。 php artisan up

      【讨论】:

        【解决方案4】:

        错误的原因可能源于 Apache 和 PHP-FPM 的请求过载。 PHP-FPM,偶尔还有 Apache,需要调整它们的限制来解决这个问题。

        首先,我们建议尝试从 WHM“MultiPHP 管理器”中调整 PHP-FPM 池限制。在全球范围内这样做:

        [1] Access WHM >> MultiPHP Manager
        [2] Select "System PHP-FPM Configuration"
        [3] Adjust the "Max Children" and "Max Requests" fields. We recommend incrementing in values of 5 to 10 to ensure that PHP-FPM does not get overloaded.
        [4] Save your configuration settings
        
        To perform these changes by domain:
        
        [1] Access WHM >> MultiPHP Manager
        [2] Scroll down and locate a domain that experiences the problem.
        [3] Select "Edit PHP-FPM" for the domain in question.
        [4] Adjust the "Max Children" and "Max Requests" fields.
        [5] Save your configuration settings
        

        【讨论】:

          【解决方案5】:

          如果您之前运行过php artisan down,那么您可能会遇到这个问题。 您必须使用php artisan up 命令来弥补这一点

          为什么会这样?因为我犯了同样的错误php artisan down然后运行

           php artisan serve
          

          CLI 向我展示了

          <http://127.0.0.1:8000>
          [Thu Dec 31 00:25:23 2020] PHP 7.4.3 Development Server (http://127.0.0.1:8000) started
          

          应用程序已启动,但显示 503 服务不可用,然后run php artisan up 和应用程序已启动。

          运行此命令以使其可行

          php artisan up

          【讨论】:

            【解决方案6】:

            如果您收到“Laravel Error 503 Service Unavailable Service”但日志文件中没有信息,请检查文件系统状态。您可能已填满磁盘空间。检查填充的内容:

            cd / && sudo du -h --max-depth=1 -x
            

            【讨论】:

              【解决方案7】:

              503 服务不可用 服务器当前不可用(因为它超载或停机维护)。一般来说,这是一个暂时的状态

              【讨论】:

                猜你喜欢
                • 1970-01-01
                • 2017-01-14
                • 1970-01-01
                • 1970-01-01
                • 2021-01-07
                • 1970-01-01
                • 2011-08-04
                • 2015-01-14
                相关资源
                最近更新 更多