title: Laravel app not handling requests in parallel
body: <p>I am building a Laravel web app that performs some long running queries and utilizes a couple (both internal and external) APIs. I am having a hard time figuring out why I can't handle requests in parallel. To shed some light on my issue, here is the high level overview of my system/problem via an example:</p>
  
  <ul>
  <li>Page loads</li>
  <li>AJAX request called on page load which <code>GET</code>'s a BigQuery result set (long running query), cleans the data and executes a python clustering algorithm which creates an image and returns the path to that image to the web app
  
  <ul>
  <li>Long running (~15 seconds)</li>
  <li>Will max CPU while performing the Python clustering (at times)</li>
  </ul></li>
  <li>AJAX request called which queries an external API for some information and simply displays it
  
  <ul>
  <li>Short running (~1-2 seconds)</li>
  </ul></li>
  </ul>
  
  <p>The issue is that my AJAX requests are not being handled in parallel. The first one is received and the web app does not begin the other until the first is complete. I've checked the network tab in Chrome dev tools and both requests are being made in parallel but the web server is not handling them in parallel. </p>
  
  <p>I cannot determine if this is an error in configuration with php, artisan, Laravel or if I have a whole other problem on my hands. I've done some testing with two simple route closures: one that simply returns a string and another which returns a string after <code>sleep(10)</code>. When I call both with AJAX, the instantly returning route does not return until the long running request is served (after sleeping). </p>
  
  <p><em>TL;DR</em>: It's clear both AJAX calls are being fired and received in parallel, but how can I have my Laravel web app handle the requests in parallel (concurrently)? </p>