Page generation runs quickly, but...

Page generation runs quickly, but...

by Shevchenko Dmitry -
Number of replies: 5
Hello, we have a following problem. Our Moodle 1.7.7 is deployed on a Windows 2008 server on IIS 7.0 using FastCGI. PHP is 5.1.4 and MySQL is 5.0.24. Currently all the pages are loading very slowly, except for the login page (for the last two days, but in previous months everything worked fine).

I tried to check if the problem is in server overload or too many connections. So, I closed the access to server for users temporarily, has set up the standard theme and turned on perfomance info. The pages still load very slowly, however, their generation time, printed down at the footer, does not seem that huge at all. For example, the HTTP admin settings page is generated in 0.7 seconds (at least performance info says so), but I had to wait for about 10 seconds, until it loaded completely. It seems like something is blocking Moodle from delivering the generated page immediately.

At some threads I've seen that this could be caused by networking problems, however, right now I am performing my tests locally on the server itself, so I guess there should not be any problems at all. So, what could possibly be wrong and how to check that. We also have another two servers in the same sub-network, but they seem to be working fine...
Average of ratings: -
In reply to Shevchenko Dmitry

Re: Page generation runs quickly, but...

by Shevchenko Dmitry -
Maybe it's not the networking problems. I deployed on a server a database of significantly smaller size, and the generation time remains the same, but pages now load much faster (twice faster). Does page generation time in performance info include the interaction with database or not?

What should I do in order to make database run faster? Maybe clear logs somehow, cause right now they are huge?
In reply to Shevchenko Dmitry

Re: Page generation runs quickly, but...

by Shevchenko Dmitry -
Gets even more interesting. If I remove all the blocks from the main page, the page loads very fast, however, the course pages are still loading slow. What's worse, if I try to open the main page after travelling through courses, it also loads as slow, as before.
In reply to Shevchenko Dmitry

Re: Page generation runs quickly, but...

by Shevchenko Dmitry -
Solved it finally thanks to this thread. It turned out, that this problem with performance only affects two users with admin privileges - me and my boss. All other users work fine, since this problem arised because of this bug. Looks like we need to migrate to version 1.8 in order to make it work faster under admins. The database itself has nothing to do with it. All that matters is the number of courses and blocks on the main page...
In reply to Shevchenko Dmitry

Re: Page generation runs quickly, but...

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Actually, if you are migrating, you should be going to 1.9.5+
In reply to Tim Hunt

Re: Page generation runs quickly, but...

by Shevchenko Dmitry -
Yeah, I would love too, however, we made many changes in order to adapt our system for specific needs of our university (for example, developed our own code for global groups). And I have to merge them first, and make sure that everything works fine, so I prefer to migrate to 1.8.9 first, and only after that to 1.9.5, in order to smooth migration. Because the code changed significantly.