繁体   English   中英

Laravel 错误 503 服务不可用服务

[英]Laravel Error 503 Service Unavailable Service

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

上师冥想:XID:5312211

清漆缓存服务器

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

看起来您运行了 artisan down 命令,但没有运行 up 命令。 只需运行:

php artisan up

然后你会得到:

“应用程序现已上线。”

如果尝试过php artisan up命令,但您的网站仍然无法启动并给出 503,则

删除文件里面/存储/框架/

在此处输入图片说明

我在 Cpanel 中遇到了同样的问题,我做了什么来解决这个问题。

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

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

首先,我们建议尝试从 WHM“MultiPHP Manager”中调整 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

如果您之前运行过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

如果您收到“Laravel 错误 503 服务不可用服务”但日志文件中没有信息,请检查文件系统状态。 您可能已经填满了磁盘空间。 检查什么填充它:

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

503 Service Unavailable 服务器当前不可用(过载或停机维护)。 一般来说,这是一个临时状态

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM