-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routing takes CPU to 100% #14418
Comments
Just some more info. Created a controller with 1 method that return the welcome view. Mapped the 2 routes I had to 'TestController@showWelcome'. Ran |
Which version do you use? and does it also happen on a earlier versions, like 5.2.40 - 5.2.39 - 5.2.38? Maybe this commit has to do something with it? #14386 |
I was using 5.2.41. I downgraded to 5.2.38 and I have the same issue. It also happens in the last version of 4.2. |
is there a version where you don't have this issue? |
Didn't try 5 and 5.1, but the ones I tried it always happens. Didn't anyone had this issue before when stress testing? |
Do single requests also happen slower, or just the stress testing? Eg. hit both in the browser and check the actual response time. |
No. Single request are fine. In the browser and through ab with -n 1. |
This is really weird. In the machine where I did the tests the apache processes spike the cpu but in a micro instance in amazon the results are basically the same with both routes. Must be something in my local server. The only thing I can think of is some apache configuration since I did an upgrade from ubuntu 12.04 to ubuntu 14.04 which upgraded from apache 2.2 to 2.4. Probably it left some wrong configuration on it. It is not a laravel problem since other frameworks like Magento in the same server behave in the same way when testing. I'm very sorry to have wasted your time on this. Thank you very much. |
Hi,
I've setup a ubuntu 14.04 with php 5.5 and apache 2.4.
I installed a fresh laravel 5.2. No database connections in the project.
I then when to app/Http/routes.php and edited to:
So basically I have 2 routes just showing the welcome view.
I then run:
The Cpu never goes over 6% and I get the following results:
I then run:
The Cpu immediately goes up to 100% and at the end I get these results:
It seems that if it is not the root route laravel spikes the cpu if there are a lot of connections. This also happend with a fresh install in laravel 4.2.
Can anyone point out why this happens? I really need this solved.
My server has a 8 core Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz with 8GB of RAM.
Thanks.
The text was updated successfully, but these errors were encountered: