Courses Gone Blank..Help Please

Courses Gone Blank..Help Please

Michael Winter -
回帖数:11

I am after anyone who could help as we have quite a serious problem with about 6 of our courses. We were doing training with teachers with about 25 on and editing courses and 6 of them all of a sudden went very slow and now nothing comes up.

Here is a screenshot

Error

My specs are

Moodle Ver - Moodle 1.5.3+ (2005060230)

Running on Windows 2003 IIS

PHP - 5

MySQL - 4.1

I tried looking at the table to see if there is any info in there but I am not a programmer at all and could not find them..I tried using MYSQL administrator. Can anyone tell me how to get the table info of courses either in mysql admin or using DOS ?

At the moment the course takes about 30 seconds to load and only gives the admin Menu. I didn't want to stufff around with views and stuff in case I lost work that was on there.


回复Michael Winter

Re: Courses Gone Blank..Help Please

Iñaki Arenaza -
Core developers的头像 Documentation writers的头像 Peer reviewers的头像 Plugin developers的头像
At the moment the course takes about 30 seconds to load and only gives the admin Menu

If it's taking 30 seconds to load, then this is part of the problem. By default, PHP lets its scripts run for 30 seconds, and then kills them (to avoid running forever killing the machine).

But the solution is not increasing this timeout, but to search what is the root cause for this delay. Normally, generatin a page is a mater of a few seconds (usually under 5-10 seconds for very complex pages). So if you are seein 30+ seconds delays, then I would monitor your server to see if your CPU is maxed out, or you are running out of memory and swapping badly, or you have network delays (in case your db is in another machine), etc.

Saludos. Iñaki.
回复Iñaki Arenaza

Re: Courses Gone Blank..Help Please

Michael Winter -

I don't think it is the server as it happens in 5-6 specific courses ...even if I get here 1st thing in the morning (when nobody will be on) and go to any of those courses and they still don't load...go to any other and like you say it takes 1-2 seconds to load.

I did a test and backed up the course and all the data seems to be in the backup so I will try in the next few hours to restore to a blank course and see if it works.

Will report back.

回复Iñaki Arenaza

Re: Courses Gone Blank..Help Please

Michael Winter -

Just went to restore from the main page and went to browse to the file and got this.

<>Fatal error>: Maximum execution time of 30 seconds exceeded in D:\ourmoodle\lib\moodlelib.php on line 4085

On that file on that line is

        if (filetype($fullfile) == 'dir') {

Does that have anything to do with it ? The code around that line are below.

  if (!is_dir($rootdir)) {          // Must be a directory
        return $dirs;
    }

    if (!$dir = @opendir($rootdir)) {  // Can't open it for some reason
        return $dirs;
    }

    while (false !== ($file = readdir($dir))) {
        $firstchar = substr($file, 0, 1);
        if ($firstchar == '.' or $file == 'CVS' or $file == $excludefile) {
            continue;
        }
        $fullfile = $rootdir .'/'. $file;
        if (filetype($fullfile) == 'dir') {
            $size += get_directory_size($fullfile, $excludefile);
        } else {
            $size += filesize($fullfile);
        }
    }
    closedir($dir);

    return $size;

回复Michael Winter

Re: Courses Gone Blank..Help Please

Iñaki Arenaza -
Core developers的头像 Documentation writers的头像 Peer reviewers的头像 Plugin developers的头像
Do you have lots and lots of files in that course (in one or more subdirectories)?

I think that is the only reason to get a timeout there...

Saludos. Iñaki.
回复Iñaki Arenaza

Re: Courses Gone Blank..Help Please

Michael Winter -

Yes I do and I deleted them ...and now it works ...so that had nothing to do with it smile.

Now back to my original problem.

Restored the course to a new one ...and still times out and comes up with just the admin menu...do you think its something in the DB ?

I have also check the rights to the course files and the site files and they seem fine.

回复Michael Winter

Re: Courses Gone Blank..Help Please

Iñaki Arenaza -
Core developers的头像 Documentation writers的头像 Peer reviewers的头像 Plugin developers的头像
I can only give a shot in the dark: enable 'debug' and 'perfdebug' in the Variables section of the Administration pages and go to one of those courses. Hopefully you'll get some information.

But the real source of information is the performance monitor of your operating system. Look at the CPU and Memory usage while you are browsing the other courses and make a baseline. Then go to the problematic courses and see what is different from the normal pattern (much more CPU used, lots and lots of RAM used, which processes are using that much CPU and/or RAM, etc.).

That will point us to one source (hopefully!), and then we'll try to see what's going on inside that source.

Saludos. Iñaki.
回复Iñaki Arenaza

Re: Courses Gone Blank..Help Please

Michael Winter -

Tried the debug and perfdebug and nothing.

Tried monitoring CPU and RAM and exactly the opposite ...actually used more ram and CPU on the pages that are working.

I did try to restore the database and site to a different machine and got the errors in the attached text file on the restore of the database. Does this mean anything to you ? When it talks about Waimea College, Waimea Intermediate..... that is the picture on the front page ...which has since been changed. We are using Jannes CMS on the front page.

Thanks a lot for your help Iñaki. I would be lost without it.

回复Iñaki Arenaza

Re: Courses Gone Blank..Help Please

Michael Winter -

Done some further investigation Iñaki and this is what the Mysql Administrator show when going to the trouble Course. When going to a normal course it just spikes once. Any help ?

Error

回复Michael Winter

Re: Courses Gone Blank..Help Please

Michael Winter -

I think I may have solved it. No idea why but I did a backup of the bad course and restored it to another server ...same OS, moodle version and PHP as far as I aware. It comes up and I notice it has 2 empty RSS feed blocks on it.

So I took those off ...did a backup and restored to original server and all is fine. Can anyone explain why that is ? I have about 5 other courses I know of that are dead so will try same with them and report back.

Michael

回复Michael Winter

Re: Courses Gone Blank..Help Please

Michael Winter -
Yes all the courses I have fixed on a seperate server have had a blank RSS block or 2 ...so they hadn't been configured. Some how my Intranet server must be timing out on these. Anyone know why ? We do have RSS feeds working all over our site so it is all configured ok.
回复Michael Winter

Re: Courses Gone Blank..Help Please

Michael Winter -

For anyone who has this problem in the future this is how I solved it. I made a new RSS block on the front page ( could be anywhere) went to edit and deleted all the RSS feeds that were in there. I then went to the affected courses and they loaded quick as with a blank RSS feed block.

I was then over RSS so deleted the blank blocks and disabled it 微笑