File Picker halting the server

File Picker halting the server

by Morten Harders -
Number of replies: 6

Hello all!

I've run into an issue with the Moodle installation at the school I'm working at.

We can no longer access the server files through the File Picker, and it's not a case of incorrect roles or incorrect file persmissions.

According to the logging I've been able to do, then Moodle starts looping through the course which you are currently in, then the category, the category's parent category and so forth, until it hits the top level of the tree.

Excerpt of the log: https://pastebin.com/7GAcQeY0

The log contains the running query, query parameters and the result of said query repeated over and over again - Please take note of the timestamps on the log entries... They're coming in fast when this happens!

(The log was taken from my development version of our installation for obvious reasons, and it is a perfect mirror image of our running application; database and all)

The above linked log is but a mere fraction of the whole thing, but it will keep on looping itself until the server runs out of memory - It also completely halts the entire Moodle-application for all users (incl. those who are doing exams...)

The course category being targeted in the loop is a top level category with no parent categories.

  • Moodle 3.3.1+ Build 20170714
  • CentOS 7.4.1708
  • Apache 2.4.6 | PHP 5.6.32/7.0.21
  • MariaDB 10.2.7

We are in the process of migrating some of our other systems to support PHP 7.x, which is why it is listed as a version too above. We've tested the installation with both 5.6.x and 7.0.x, and the problem still persists. The problem was there even before we upgraded MariaDB to 10.2.7


Any and all ideas are welcome! The only thing we won't be able to do is do a clean install of everything...


I tried to specify everything as thoroughly as I could, and I hope someone out there has either seen the issue before, or know why this happens.


Regards

 - Morten

Average of ratings: -
In reply to Morten Harders

Reg: File Picker halting the server

by Morten Harders -

This post has been cooking for a good few weeks now, and no responses - Does this mean that the issue is unknown, or just that nobody really knows why it goes loop-de-loop?

In reply to Morten Harders

Re: Reg: File Picker halting the server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Can't help you there. May be you can dig further as explained in this dialogue: https://moodle.org/mod/forum/discuss.php?d=366360#p1478161 (and the discussion that followed).
In reply to Visvanath Ratnaweera

Re: Re: Reg: File Picker halting the server

by Morten Harders -

I just quickly browsed through the post you referred to (and thank you for that), but that seems to have something to do with broken AJAX requests - The issue I've described above is not a "simple" broken AJAX request - This is Moodle sending itself into an infinite loop of sorts.

It really just happened from on day to another without any updates being done to the system (we document every single tiny thing we change to the servers config, software and hardware exspanses)

In reply to Morten Harders

Re: Reg: File Picker halting the server

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

Basics:

1. Are there any optional plugins/themes? Get rid of them (just to exclude them if nothing else)

2. You have cleared the caches?

3. Switch on Debugging. Check your web server's error log. 

4. Carefully check your Apache settings and check for any .htaccess files. Especially ones you might have forgotten about and/or are affecting the Moodle installation from some higher level.

5. Check and double check your config.php settings

In reply to Howard Miller

Re: Re: Reg: File Picker halting the server

by Morten Harders -

Already tried all of those things.

All plugins and themes that aren't a part of the initial installation of Moodle 3.3 were disabled at one point to see if a culprit could be found that way around (*sigh* no such luck).

Caches were cleared more times than I care to mention.

Debugging mode is almost always enabled on our test mirrors, and I had to add extra logging calls to the get log excerpt included in my first post. I dug quite a ways into the main core of Moodle to find where it ran into the infinite loop that the log is clearly a result of.

According to our git versioning the .htaccess files for Moodle hasn't changed since we made the migration from Moodle 2.9 to 3.3, and the issue even existed before the migration. (and the history of the Moodle 2.9 .htaccess was never changed from the initial install)

Browsing through the config.php (I suppose you mean the one located in document root), then everything is just fine.


I'm working towards doing a live code view of the application running, just so I can see the exact values of the variables being tossed around in the infinite loop.

In reply to Morten Harders

Re: Re: Reg: File Picker halting the server

by Benoît Rousseau -

Hi, I have the same problem , did you find a solution ?