0

My website is build with Laravel and for the most part, works perfectly fine. However, there is an occasional issue where the website comes to a complete stop and page loading takes almost 5+ minutes. I have had this issue previously and it was because there was page on the website that was performing a loop of thousands and thousands of queries depending on what the user inputted into a form. If the user entered the number 5,000 then the page would perform 5,000 queries. Once I fixed that then everything was working perfectly again. I have my suspicion that something similar has happened again however I'm having trouble pinpointing exactly what could be causing it.

Is there anything that I can do, site-wise, to monitor this and help me locate the issue? Perhaps there is something that can be done on the operating system itself (I'm using Ubuntu)? It would be great if there was some monitoring system that allowed me to see which pages took the longest to complete all of its queries to the database.

Thank you.

GalahadXVI
  • 759
  • 1
  • 8
  • 19

1 Answers1

1

If you want to track all queries/events/errors for all users with traces etc. then maybe

Laravel Telescope

is what you want. It is an UI for inspecting and debugging everything in Laravel. If your Laravel version is above 5.7.7 you can install it right away

Reduxx
  • 604
  • 4
  • 8
  • I think this is exactly what I am looking for. Thank you. Do you think this cause any problems if used on production? – GalahadXVI Mar 20 '19 at 15:56
  • It is used by a lot of folks in production, the only thing is, that it can ramp up the database quite quickly, but how to handle this is described in the [documentation](https://laravel.com/docs/5.8/telescope#data-pruning), so really a non issue :) – Reduxx Mar 20 '19 at 16:06