Answer the question
In order to leave comments, you need to log in
Why can laravel 5.2 slow down intermittently?
Hello!
There is a site on laravel 5.2.
Periodically, when updating the page, the site freezes for about 800-1200 milliseconds, the
lag occurs periodically and does not depend on anything, it seems to me :-(
Any page, ajax, any controller - I can’t understand what is the reason.
I go to any page - everything is ok, I start to update it (not quickly) and at some point it freezes, and then it loads again quickly.
You can also just walk through different pages, after 5-20 transitions there will be a lag.
Maybe someone has come across this?
Answer the question
In order to leave comments, you need to log in
Open the browser console, the network section and see how long the server response came and what happens then and for how long, find the reason - optimize. Even if it's laravel, or something else. If the problem is in the long response of the server - then already dig the logs and look for the cause there.
Perhaps mysql sometimes slows down, it is unlikely that this is due to the framework. Dig towards log-slow-queries .
Does this behavior depend on the server the site is running on or not?
Enable database query logs. You can perform profiling of the script, then look at and compare the results of "fast" and "slow" queries, understand where the bottleneck is and dig exactly there.
Read about profiling in php on the Internet .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question