Laravel Valet - Too many parallel requests getting blocked
I have this very specific project running in PHP 7.4 on my machine with Laravel Valet.
It's a front end application in vuejs with a separate back end and they are communicating through an API.
There's a page that makes a lot of requests in one go, like 20 api requests. It's directly getting blocked by NGINX which returns a 504 timeout error. Axios return a CORS error, strangely.
To fix this issue you'll need to update the valet-fpm.conf config file.
sudo nano /usr/local/etc/php/7.4/php-fpm.d/valet-fpm.conf
// Increase those values pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 10 pm.max_spare_servers = 30
Then save the file.
You'll need to run
valet restart in order to apply the change.
I consider myself as an IT Business Artisan. Or Consultant CTO. I'm a self-taught Web Developper, coach and teacher. My main work is helping and guiding digital startups.more about me
2023 © My Dynamic Production SRL All rights Reserved.