Moodle Freezing After Upgrade

Moodle Freezing After Upgrade

by Peter Meehan -
Number of replies: 12

Hi,

I have just completed an upgrade on 2 Servers  - both from 2.5 to 2.6.2.  

We have 2 Moodles running - a Production Box and a Test Box.

The Production Moodle has been operating continuously since 2008 and has been upgraded successfully each time from that original version (1.6?)

The Test Moodle was a fresh V2 install and has been running for 2 years and has been successfully upgraded each time as far as 2.5

Everything appeared to go well and initial inspection showed that things were "as expected". However after some use an unexpected issue has shown up on BOTH servers. If a Teacher tries to add anything to a Course (Add activity or resource) the screen turns a milky white (screen is still readable) and the Teacher's Moodle session freezes completely. Students are still able to access Courses and download and upload material (assignments etc).

If you close the browser window and go to Moodle again in a new one it opens normally and recognises that you are still logged in.

I do not even know where to start so assistance would be much appreciated.

I have rolled the Test machine back to the Backup taken before the Upgrade and everything works correctly. Obviously I do not want to be stuck with a Moodle which cannot be upgraded however so I would prefer a permanent solution rather than a band aid return to 2.5

 SPECS:

Windows Server 2003

XAMPP

mysql 5.5.27

php 5.4.27

Apache 2.4.3

16Gb RAM

Have tried Firefox, IE and Chrome - the same issue occurs in all browsers. Have accessed it through various PCs and Macs - same story with each.

HELP?

Peter

 

Average of ratings: -
In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

1. Can we get a screen-shot of the 'frozen' screen please?

2. Have you switched on Debugging to see if anything shows up?

3. What optional plugins (if any) do you have? Make sure they are the correct version and, failing that, disable/remove them to see if it makes any difference.

4. Have you checked your web server's error logs?

In reply to Howard Miller

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi Howard,

Thanks very much for your reply.

1. Screen shot attached.

2. I did turn on debugging but saw nothing on screen. If I am supposed to look somewhere else for the results I don't know where.

3. Lots of plugins - too many to list here.Updated all of those as part of the process. Assumed it might be one of them but had hoped for some way to narrow down the search.

4. Server logs not showing anything special or out of the ordinary.

5. PHP a possible candidate?

6. All suggestions gratefully accepted - my teachers are not happy. angry

Peter

 

Attachment Frozen Moodle.jpg
In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

The screen shot you show is the first step to adding an activity.   Do all teachers/users get that same screen or just your account?  Either way, site is confused.   Server running any cacheing like memcache(d) or any PHP op like APC or Zend OpCache?

Think I'd set sessions to use file rather than DB in config.php
$CFG->dbsessions='0';

A 'sessions' folder should be created in moodledata and one should see session files created as users login.

No need to restart services just access via browser.   Before doing that, however, clear browser cookies and cache.   And would manually clear the caches on Moodle as well:

cd moodlecode/admin/cli/

/pathto/php purge_caches.php [ENTER]

If one cannot use command line php one could try going directly via browser without logging on:

http://yoursite/admin/purgecaches.php

If that doesn't work, think I'd go to /moodledata/cache/cachestore_file/default_application and manually remove all the folders/files there.  Moodle should re-create them.

And there are not clues/hints in any server logs for apache?  error_log?  does access_log show access?

'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi,

Yes it presents the screen and immediately whitens and freezes.

It is happening to all users, on all machines and using all browsers.

No cache extras are installed, though 2.6 has a note about it in the Notifications. Is this essential? Should I try this first?

On my Test Server I reinstalled the backup from before the Upgrade and everything works fine but, as mentioned, I don't want to be locked into a version which cannot be upgraded. It is clear that something has happened during the Upgrade, but no idea what! It happened to both Servers but as it was not apparent I thought that it was successful on the Test Server and then upgraded the Production Server!

Error Logs do not appear to show anything out of the ordinary.

I am about to apply your suggested steps and will report back.

Peter

In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi,

Interesting developments....

First - I tried all your suggestions (on the Test Server) but unfortunately no change in response occurred.

Second - I have discovered that NOT ALL logins are affected by this issue. As an example, if I log in under my administrator level persona, the problem happens. If I log in under my teacher persona everything works! Same machine, same browser. Some Staff have the issue - others do not. I thought that I was confused before - but now??

Really looking for some logic to this now?? Corrupt profiles? Other thoughts?

Peter

In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

The only thing I can think of that would affect accounts like that on initial login is sessions.  An admin level user login will always take longer because their session information contains more data.  No mysql errors?

Are session files being created in moodledata/sessions folder?

So turning on Debugging shows nothing?

Is your site remotely hosted?  Some hosting providers have restrictions set on shared hosting plans such that a script that consumes too much memory or runs too long is killed ... in such a fashion as not to report back to browser or server.

So you might share some more information about your production server platform.  If your test server is on a desktop machine and production is under Linux on a remotely hosted system it is indeed possible that one would not experience issues on desktop ... different overall environment.

'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi,

Our Servers are both Windows, on site, managed by us. Specs are in the OP.

I have tested this behaviour on both Servers now and it is consistent - one account behaves normally, one freezes. I am at my wits end. Debugging shows some rendering issues in the Rocket theme but nothing else at all. I can't see that having an effect in one account but not another? I will check mysql logs. 

Thanks for your help so far - all ideas are good - I have none!

Peter

In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Doesn't that version of PHP come with Zend OpCache?

php -m |grep Zend

Would show if the module is loaded.

Do you have any tool for checking OpCache configuration? ... like OpCacheGUI, or other.   This might help if you do:

http://stackoverflow.com/questions/17224798/how-to-use-php-opcache

Can you get to the Site Admin Menu?

Check the assigned roles of one account that is NOT affected.   Also check the role of an account that IS affected.  Do you have any custom roles for teachers?   Then check:

Users -> Permissions -> Then one of two tools:  Check System Permissions or Capability overview.

Can login as one of those affected users ... not your admin account.

Noticed in the screen shot the menus are docked.   Can a user who cannot add an activity un-dock those menus and then try adding a resource?  Themes have to support docking. 

From the setting is says:

"If enabled and supported by the selected theme users can choose to move blocks to a special dock."

Any customization to theme being used?   What happens if one changes theme?

Those settings per user would be in sessions ... file or DB (although criptic ... ie, I could not tell you what value in the sessions info was for permissions to what ability).

Since the site has been in use for a long time, what of checking tables to see if any are in need of repair?

mdl_role_capabilities???

'spirit of sharing', Ken

In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi,

I am now using a work around - not happy with it (extra work) and it is a pretty blunt instrument, but it appears to be working.

Following down the track that the issue was not affecting everyone, I tried deleting an account and then recreating it. It has definitely fixed the problem for the account I tested it on.

There MAY be implications in doing this that I have not thought of, so if anyone can see any (other than having to put all these people back into multiple Courses) please let me know.

An added phenomenon - it appears that Profile images are also not showing up .....

 

Peter

In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi,

Back again smile

My workaround has lasted only a week and the problem has returned! In other words, whatever caused the problem for the original profiles has now also affected the new profiles. I am interested in following up the suggestion that was made in relation to mysql files possibly needing attention? I'm not really sure where to start so any and all assistance will be gratefully accepted.


Peter


In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Peter Meehan -

Hi,

A further update - I have checked all the mysql tables through phpmyadmin. It reported that mdl_log was corrupt and I have fixed this. All tables now check out successfully as OK. No change to Moodle behaviour sadly.

Peter

In reply to Peter Meehan

Re: Moodle Freezing After Upgrade

by Peter Meehan -

SOLVED!

Looking through the offered advice, one thing struck me immediately - we run the Rocket Theme and it was definitely one that was Updated during the Upgrade. If I have anything in the Dock the problem occurs. Nothing in the Dock - all is well. Who would have thought? I have been running that Theme without any such issue for nearly three years! Thank you very much for that insight Ken.

Now all I need to do is work out why Apache keeps restarting .....

Peter