hope you are doing well.
I am encountering the following error when running my Symfony project with Nginx and PHP-FPM on local :
unable to connect to the PHP FastCGI process: dial tcp :53315: socket: too many open files
Sometimes when I start the Symfony server using symfony serve -d
, I encounter the error "ERR_CONNECTION_CLOSED" in Chrome. When I check the symfony server:log
command, nothing is displayed.
My configs : MAC M1 Ventura 13.4, Docker 23.0.5, php 8.2.6, nginx/1.25.0, homebrew, symfony cli 5.5.6.
I have followed several troubleshooting steps, including increasing the file open limits, adjusting Nginx and PHP-FPM configurations, and ensuring proper file permissions. However, I am still unable to resolve the issue.
ulimit -n 65535
change nginx config file : worker_rlimit_nofile 4096;
change php-fpm config file www.conf : pm.max_requests = 20;
restart all services (nginx, php, symfony-cli)
I would like to mention that the nginx -t
test shows test is successful.
I have also reinstalled Nginx, PHP, and Symfony CLI, but still nothing is working.
The php builtin server works.
Any insights into the possible causes of this error and suggestions for resolving it would be greatly appreciated.
Thank you in advance for your assistance!