Very long loading time, despite of fast queries


I’ve a server which is (sadly) still using php 5.4 + fpm and Yii 1.1.15. Recently I’m experiencing very very long loading times, so I enabled yii-debug-toolbar to see what’s going on during the request.

So I checked some pages and what I find is odd:

  • 39 queries in 7.0186 s.

  • Page Load Time: 51.463400 s.

  • Elapsed Time: 51.847149 s.

  • Memory Usage: 15,026 KB

  • Memory Peak Usage: 15,445 KB

  • Session Size: 0.979 KB

If the queries take 7s, why the page load takes nearly ten times more? What’s going on?

I’m attaching here a clear example: 0.02s query time, 177s page rendering!!

Could it be because of relations?


screenshot-2016-06-09 11-04-55.png

ended up being a cURL request being executed to a dead website :(