Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

transporindo-pusat's avatar

Issue with Multiple Laravel API Requests via cURL on Nginx in Laragon

I'm trying to configure Nginx with PHP 7.4 NTS in Laragon and I'm encountering an issue with making (probably concurrent?) API requests.

My Setup:

Operating System: Windows (using Laragon) Web Server: Nginx PHP Version: PHP 7.4 NTS Framework: Laravel Behavior:

  • Single Laravel API request via Postman → Works ✅

  • One Laravel API request via cURL → Works ✅

  • Two concurrent Laravel API requests via cURL → Stuck ❌

  • One Laravel API request and one Fake API request → Works ✅

Example Code (Two Requests via cURL): Paste in Pastebin (https://pastebin.com/7F3gEQUJ)

Problem:

When I send two Laravel API requests at once via cURL, the second request doesn't seem to get processed and just hangs or times out. However, if I send requests separately (one after another), both work fine. Similarly, if I mix a real Laravel API request with a fake one, they work fine concurrently. What I've Tried: Tested with Postman and it works fine for both single and multiple requests. One request at a time works fine via cURL. Using Fake APIs concurrently also works, indicating the issue is specific to Laravel API calls.

Questions:

What could be causing multiple concurrent requests to get stuck when using cURL with Nginx and Laravel API? Is there something I need to configure in my Nginx or PHP setup to allow multiple concurrent requests to work?

Images:

This is sample of testing concurrent request in cURL using Laravel API (Loading not stop until we stopped the NGINX in Laragon or it will be 504 (Gateway Timed-Out)

This is the result when one of my request is from Fake API

0 likes
3 replies
transporindo-pusat's avatar

@Snapey In Frontend, receive response from Laravel API (this case using NGINX from Laragon) and it stuck unlimited time but, if frontend receive from another API (e.g: From Nest.JS backend, Django backend) it works normally

My frontend and my backend is using Laravel 8

Tray2's avatar

I would suggest ditching Laragon, and try using Laravel Herd + dbngin instead.

Please or to participate in this conversation.