Hi Folks,
I'm new to laravel and haven't dont any real web development in close to a decade and i'm having to quickly ramp up a site for a friend. The problem I have is the following:
Sometimes when I open the site in a new tab, try to hit it fresh, click my home button on my site navbar which redirects to "/", or even empty cache and hard reload the request to my base site takes well over 2 minutes for a response IF it even gets one. if it doesn't it cancels at the end then resends the request and the page loads practically instantaneously on the new request. If it gets there at the end of 2 minutes it finally loads it all at once. I've checked my network tab in the console and it's sitting on the waiting(TTFB) for that entire interval, the content download and request sent happen in a fraction of a millisecond. This issue is intermittent, sometimes laravel decides to be good, and sometimes it just wants to watch the world burn. I had to increase the ng-inx timeout to get this far in the diagnostics because I kept getting a 503 timeout and found some timeout configs via google to stop that.
I've checked my laravel logs and nothing shows up. I tried to search for profile tools and found something called blackfire so I even installed blackfire(upgraded it on my homestead since its already installed) hoping to track this sucker down but now the site is currently working perfectly without any hitch whatsoever.
I also have the site up on a elastic beanstalk instance, and it is now giving me the intermittent problems as well.
Are there any common mistakes that might cause this to happen or possible debugs I can turn on if the site takes longer then normal to load to dump some metrics so I can actually catch it when it happens? I was afraid it was due to having so much data in my database but since its not consistent and multiple other hits to my DB for different data using the same functions (i'm building a directory app, so I can supply different starting points to pull the same data I do on page load at any time by just supplying another location instead of my default location grabbed by my ip) work super fast and function properly, even sites with even more locations they grab in the collection, perform super fast and perfect.
Sorry not trying to ask anyone to fix my dumb code but If that kind of issue rings a bell or if theres some extended debugging for the entire site i can turn on to hunt this down that people would know if I would greatly appreciate it!
Thanks!
Paul