Adding User Filter Generates Error: Memory Size Exhausted

Adding User Filter Generates Error: Memory Size Exhausted

by Rob Cole -
Number of replies: 3

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 86 bytes) in [path_to_moodle]/mysqli_native_moodle_database.php on line 1084


I have two installations of Moodle 2.8, both with Configurable Reports. I was able to set up some reports on the one installation, and they run perfectly. I have copied the report SQL to the second installation and am adding the filters to match the first installation. Whenever I add a User Filter field, then look at the report, it generates the above error message.

Both installations have 256MB of memory. How come one installation stays within the memory limit, but the second one does not? (The second installation also suffers from slow performance.)

Average of ratings: -
In reply to Rob Cole

Re: Adding User Filter Generates Error: Memory Size Exhausted

by Phil Everist -


Does the second database have the same number of users?  I think I have seen other posts indicating this happens when there are too many records in the database,

 

I am also getting this error on a database with close to 20,000 accounts - please let me know if you find a resolution - I am using the ad-hoc queries plug in instead due to this issue

Phil.

 

  

In reply to Phil Everist

Re: Adding User Filter Generates Error: Memory Size Exhausted

by Rob Cole -

I was able to fix the issue. In the viewreport.php, I added:

ini_set('memory_limit','512M');

as the first line of code. I had to play around with the memory to get just the right amount for the page.