Laravel Project - Long Wait Times
-
I got a new workstation laptop at work and I of course I use Laragon for my local dev server needs. I am running into this issue where whenever any server request is made there is a HUGE request wait times of over 2 seconds in my laravel application. If I create a simple 2 page html product that just have a anchor to each page navigation is super fast.
Any ideas as to why I am seeing this long wait time? I am including a screenshot to my "main" page of my laravel project to show the timings from the network tab of the initial get request when hitting the root endpoint. The rest of the requests (loading js, css, font awesome, etc.) are all maxed out at 158ms of wait time.
-
@chad_gregory
Couple of things to check -- Does the same thing happen for simple 2 page PHP application? Just trying to see if the issue is in PHP or Apache or something else. (This might clarify if the issue is with something in PHP)
- Apache logs - Any errors that come up in Apache access logs? (Clarify issues with Apache config)
- Is the behavior same from another browser? (Clarify if it's a browser issue, something like a plugin interfering)
-
I should have mentioned that yes I did test a simple 2 page application with nothing but links and it was working perfectly fine, no wait time.
I cleared the error.log, reloaded the apache server and reloaded a page and this is the contents of error.log
[NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL]
[Fri Nov 22 13:51:37.882611 2019] [mpm_winnt:notice] [pid 17568:tid 644] AH00424: Parent: Received restart signal -- Restarting the server.
[Fri Nov 22 13:51:38.138761 2019] [mpm_winnt:notice] [pid 17568:tid 644] AH00455: Apache/2.4.35 (Win64) OpenSSL/1.1.1b PHP/7.2.19 configured -- resuming normal operations
[Fri Nov 22 13:51:38.138761 2019] [mpm_winnt:notice] [pid 17568:tid 644] AH00456: Apache Lounge VC15 Server built: Sep 19 2018 16:08:47
[Fri Nov 22 13:51:38.138761 2019] [core:notice] [pid 17568:tid 644] AH00094: Command line: 'C:\laragon\bin\apache\httpd-2.4.35-win64-VC15\bin\httpd -d C:/laragon/bin/apache/httpd-2.4.35-win64-VC15'
[Fri Nov 22 13:51:38.150440 2019] [mpm_winnt:notice] [pid 17568:tid 644] AH00418: Parent: Created child process 29644
[Fri Nov 22 13:51:39.008234 2019] [mpm_winnt:notice] [pid 29644:tid 544] AH00354: Child: Starting 64 worker threads.
[Fri Nov 22 13:51:39.885115 2019] [mpm_winnt:notice] [pid 11044:tid 676] AH00364: Child: All worker threads have exited.Same thing with the access.log
127.0.0.1 - - [22/Nov/2019:13:55:58 -0500] "POST /schedule/2019-11-21/action HTTP/1.1" 200 -
Same thing in another browser with no plugins
-
@chad_gregory said in Laravel Project - Long Wait Times:
[NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL][NULL]
I wonder why it's printing that.
Also, are there any Laravel's logs?
And can you screenshot the network tab of chrome developer tools as well?
-
@njfsm Nothing in the Laravel logs
Here is the screenshot. I am loading it up in chrome (browser with no extensions installed) and just hitting the root endpoint which redirects to the login page
-
I even created a brand new project and get the same wait time
-
@chad_gregory
Not sure what is happening here Chad. I would try installing XAMPP or WAMP server:
This will tell us if it's Laragon or some company firewall policy that is affecting the webserver.
-
@njfsm I installed Wamp64 (ugh feel gross now lol) and wait time is 57ms. Here I'm loading the standard laravel homepage
I even tried re installing laragon and the issue persists.
-
Quick Update.
I uninstalled laragon again but this time I also cleared out the C:\Laragon directory except for my document root. Now my wait times decreased to 182ms