Good spot - I entirely missed that he'd changed the value (not just removed the define). There'll be many fewer courses than users.
Howard Miller
Forumindlæg af Howard Miller
If, as I think you are saying, that you effectively replaced CONTEXT_USER with its defined value 50. And that's ALL you did? And the result was that the query was an order of magnitude faster?
I find that somewhere between very weird and hard to believe. Are you sure that you didn't do anything else?
That's a lot of users in one course. However, we have some with even more and the Participants page still loads reasonably quickly.
I find that somewhere between very weird and hard to believe. Are you sure that you didn't do anything else?
That's a lot of users in one course. However, we have some with even more and the Participants page still loads reasonably quickly.
There's usually some stuff in the adhoc queue that never seems to shift. Some things that fail seem to retry forever. To be certain, you'd need to have a look at the mdl_task_adhoc paying particular attention to the 'faildelay' column. It maxes out at 86400 (retry once a day).
The main part of your question is harder to answer. You can slowly increase them while monitoring the load on your server. We have a dedicated server just for the cron tasks - which makes it a whole lot easier.
The main part of your question is harder to answer. You can slowly increase them while monitoring the load on your server. We have a dedicated server just for the cron tasks - which makes it a whole lot easier.
I assume that this is trying to find the class defined in cache/classes/loaders.php
First make sure that you have that file and it's not corrupt in some way.
Failing that, I can only think that the class loader isn't working properly as this is going on reasonably early on in the 'bootstrapping' of Moodle.
First make sure that you have that file and it's not corrupt in some way.
Failing that, I can only think that the class loader isn't working properly as this is going on reasonably early on in the 'bootstrapping' of Moodle.
Brilliant - thanks 
Now that I know it's possible, I can try to track down a working example. But, yes, that certainly gives me somewhere to start.
Now that I know it's possible, I can try to track down a working example. But, yes, that certainly gives me somewhere to start.