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.

laravel
php
request
valet
nginx
cors
concurrent
parallel
axios

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

    18SY81ejLGFuJ9KMWQu5zPrDGuR5rDiauM

  • ETH

    ETH

    0x519e0eaa9bc83018bb306880548b79fc0794cd08

  • Monero

    XMR

    895bSneY4eoZjsr2hN2CAALkUrMExHEV5Pbg8TJb6ejnMLN7js1gLAXQySqbSbfzjWHQpQhQpvFtojbkdZQZmM9qCFz7BXU

recent posts

QBUS - MQTT Quick Tutorial

1
10 months ago

DDOS By Web Crawlers

1
1 year ago

Something Given

1
1 year ago

2024 © My Dynamic Production SRL All rights Reserved.