简体   繁体   English

内部服务器错误 500 使服务器崩溃 laravel

[英]Internal server error 500 crashes server laravel

Every time there is 500 error server cpu gets 100% and crashes needs to restart every time每次出现 500 错误服务器 cpu 获得 100% 并且每次崩溃都需要重新启动

PHP Version 7.4
Laravel Version 8.83
Ubuntu Centos7

I found this in php7.4-fpm.log error logs我在 php7.4-fpm.log 错误日志中发现了这个

[13-Sep-2022 08:13:16] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[13-Sep-2022 08:19:05] NOTICE: Terminating ...
[13-Sep-2022 08:19:05] NOTICE: exiting, bye-bye!

error.log错误日志

2022/09/13 10:52:53 [error] 889#889: *3130 upstream timed out (110: Connection timed out) while reading response header from upstream
2022/09/13 11:09:41 [crit] 889#889: *148 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking

Does anyone know about this?有人知道吗?

Your PHP-FPM config is set to the default 5 children (simultaneously executing PHP requests) and that limit is (on occasion it appears) being exceeded and hence the 500 error.您的 PHP-FPM 配置设置为默认的5个子项(同时执行 PHP 请求)并且该限制(有时会出现)被超出,因此出现500错误。 Have a read of this article if you want background knowledge on the PHP-FPM max_children setting.如果您想了解有关 PHP-FPM max_children设置的背景知识,请阅读本文

There is also a handy online calculator for calculating a more appropriate max_children value for your server configuration.还有一个方便的在线计算器,用于为您的服务器配置计算更合适的max_children值。

Once you have calculated a new (higher) value for the setting, you'll need to update your PHP-FPM configuration and reset the PHP-FPM service on your server for the change to take effect.计算出新的(更高的)设置值后,您需要更新 PHP-FPM 配置并重置服务器上的 PHP-FPM 服务以使更改生效。

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

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