简体   繁体   中英

Internal server error 500 crashes server laravel

Every time there is 500 error server cpu gets 100% and crashes needs to restart every time

PHP Version 7.4
Laravel Version 8.83
Ubuntu Centos7

I found this in php7.4-fpm.log error logs

[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. Have a read of this article if you want background knowledge on the PHP-FPM max_children setting.

There is also a handy online calculator for calculating a more appropriate max_children value for your server configuration.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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