Moodle site gradually slowed now essentially stopped

Moodle site gradually slowed now essentially stopped

by Patrick Hallermann -
Number of replies: 12

Hi All,

I have a Moodle 2.3.3 Installation on Windows 2008, Running Bitami Stack, with Apache and MySQL, 8 gig ram. Site users, no more than 10 at a time.

No changes have been made to anything, and the site ran great for 10 months. The Moodle installation is now really really slow. Navigating through admin and settings is no issue, thats still quick enough. But using anything with /moodle/mod/ or moodle/my/ takes around 1 minute to load.

I have APC accellerator installed and configured, I run cron every other day. The Log file for MySQL is 140mb in size and I truncated it and set log duration for 7 days in moodle. I have also disabled sql session handling. Server is cleaned up...

Kind of out of ideas...and a little desperate sad Can anyone please help? Short of suggesting a fresh install using linux smile

Best regards,

 

Patrick

 

 

 

 

 

Average of ratings: -
In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Are you running automatic backups?  Have they filled up your hard drive maybe?

In reply to Emma Richardson

Re: Moodle site gradually slowed now essentially stopped

by Patrick Hallermann -

Hi Emma,

Thanks for the reply.

Automatic backups are turned off. The hard drive has 60GB left. The processor is Xeon 2.67ghz. The CPU is spiking to 100%, even with one user.

Regards,

Patrick

 

 

 

In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by Ken Task -
Picture of Particularly helpful Moodlers

Don't think running cron does anything with APC.  APC has a apc.php file that one could move to document root to check fragmentation/reset APC.   What is memory allocation for APC?

Suggest you purge caches in Moodle:  http://site/admin/purgecaches.php and clear (refresh) APC then check APC.

There could also be some issues with MySQL.   Got anything to use for a 'tuner' to check MySQL performance?

'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle site gradually slowed now essentially stopped

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So what is the process that is using all the CPU?

In reply to Emma Richardson

Re: Moodle site gradually slowed now essentially stopped

by Patrick Hallermann -

Hi Emma,Apache and MySQL are the two processes hogging everything.

In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Apache probably should be using a fair amount but mysql shouldn't be horribly high, I don't think.  I would suspect that as a place to start.  Have you tried turning on debugging just to see if that gives you any clues - it might point you to a corrupted table.  Can you run some maintenance on your database (backup first!)?  Also look at your mdl_backup_controllers table - that has been guilty in the past of growing to huge proportions!  It can also be truncated (again backup first!!!).

 

In reply to Ken Task

Re: Moodle site gradually slowed now essentially stopped

by Patrick Hallermann -

Thankyou Ken smile I just ran the CRON to be thorough. I only installed APC today so not sure about the ins and outs of it, but I allocated 64MB to it...

I purged the cache, but that did pretty much nothing. I purged then restarted and the same thing.

I am leaning toward MYSQL as well, thats why I truncated the log file. The CPU spikes with just one user and the Apache and MYSQL are the top two processes.

I dont have anything installed that could monitor whats really going on, but I am trying to get a PHP profiler to check it out. not much luck though. Do you know anything good that could track down the real issue?

Thanks again smile

 

Patrick

 

 

In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by Ken Task -
Picture of Particularly helpful Moodlers

Tracking down the issue involves ALL pieces that make Moodle go ... PHP, Apache, and MySQL.  Since it's Bitnami Stack have you checked with their forums to see if other Bitnami users are experiencing the same?  What versions of everything does the Bitnami Stack install?

This one??? http://bitnami.com/stack/moodle/README.txt

Since APC was install recently, have you found that apc.php of which I spoke and installed it at document root of apache server yet?  Seems to me the logs for apache might have a 'failed to allocate' error if APC runs out of memory that's been allocated to it ... 64 Meg is default for it.  Moodle 2 will eat that up in a hurry just accessing the site.  128Meg is a good starting point - but that's if there's enough memory to allocate that much.

So no clues in apache, php, mysql logs at all?

So what does your apache config file look like?  What does your my.cnf (my.ini in Windows terms) file look like?

There's a tool for Linux boxen called mysqltuner.pl.  But requires perl and going that route with a Winders machine means more non-Microsoft apps installed.  Could try a beta of it for Windows:

http://mysqltuner.codeplex.com/

Comment (question to research and food for thought): IF one does get the bitnami stack running and when Moodle makes a security announcement that should prompt you to upgrade, how easy will that upgrade be? That could be true of Apache, MySQL, and PHP separately also.   Can one upgrade (easily) say Apache separately or does one have to download the latest release of Bitnami package ... which means touching all the pieces.  Easy button install is sometimes the tip of the iceburg when it comes to maintaining.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Moodle site gradually slowed now essentially stopped

by Patrick Hallermann -

Hi guys,

 

Sorry for the super late reply, but got it sorted at the end. It was a table in the MYSQL database that had issues with the number of records.

 

Thanks for the advice guys, it really helped.

 

Pat

 

In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by Marc Hermon -

Can you expand on your solution. I think we may be having the same problem. What table and what was the problem?

In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by srikanth raju -

Hi Patrick,

please give reply,   what table and what was the problem with that particuler database table ?

In reply to Patrick Hallermann

Re: Moodle site gradually slowed now essentially stopped

by james mergenthaler -

Did you try dumping the cache on the server? Restarting the server, or at least the services (apache, mysql, php).  Try deactivating the accelerator and monitoring.  Did you check that Theme designer mode is not active?   Site statistics?  User log size?

I know, captain obvious, but, that would all be low hanging fruit.

If I had tried all that too and still saw this behavior, I would be inclined to try a moodle upgrade, after backing up my DB and current code directories.