Laravel Valet - Too many parallel requests getting blocked

profile picture

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.

about me

profile picture

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

follow me

newsletter

A weekly email with the latests articles

support my work

Start trading on binance
  • BTC

    BTC

    bc1qgw9a8hyqqwvcls9ln7vhql4mad0qkveutr2td7

  • ETH

    ETH

    0x3A720717Da03dB6f3c4a4Ff08BC64100205A79d0

2025 © My Dynamic Production SRL All rights Reserved.