When logging into Moodle this morning, I get this error...
Error reading from database
SELECT active.filter, fc.name, fc.value
FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder
FROM mdl_filter_active f
JOIN mdl_context ctx ON f.contextid = ctx.id
WHERE ctx.id IN (1,2)
GROUP BY filter
HAVING MAX(f.active * CAST(ctx.depth AS SIGNED) ) > -MIN(f.active * CAST(ctx.depth AS SIGNED) )
LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 2
ORDER BY active.sortorder
- line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 768 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 854 of /lib/filterlib.php: call to mysqli_native_moodle_database->get_recordset_sql()
- line 102 of /lib/filterlib.php: call to filter_get_active_in_context()
- line 169 of /lib/filterlib.php: call to filter_manager->load_filters()
- line 218 of /lib/filterlib.php: call to filter_manager->get_text_filters()
- line 1031 of /lib/weblib.php: call to filter_manager->text_filtering_hash()
- line 33 of /blocks/course_summary/block_course_summary.php: call to format_text()
- line 280 of /blocks/moodleblock.class.php: call to block_course_summary->get_content()
- line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
- line 926 of /lib/blocklib.php: call to block_base->get_content_for_output()
- line 978 of /lib/blocklib.php: call to block_manager->create_block_contents()
- line 349 of /lib/blocklib.php: call to block_manager->ensure_content_created()
- line 4 of /theme/base/layout/frontpage.php: call to block_manager->region_has_content()
- line 685 of /lib/outputrenderers.php: call to include()
- line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
- line ? of unknownfile: call to core_renderer->header()
- line 1363 of /lib/setuplib.php: call to call_user_func_array()
- line 91 of /index.php: call to bootstrap_renderer->__call()
- line 91 of /index.php: call to bootstrap_renderer->header()
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 538656224 bytes) in Unknown on line 0
How do I go about changing the allowed memory size?
A lot depends on your setup, but I think this is about the PHP limits, you can make adjustments to that in your PHP.ini, that should at least get you running again, but you will need to figure out the cause of the issue so it won't repeat.
If this is due to MySQL memory issues, those are assigned in my.cnf in most cases.
Again, a lot depends on your setup: hosted, shared, windows, linux, etc.
Have you attempted restarting the server?
I have not; hosted through web hosting hub- ill contact them. Thanks for the help!
The problem lies in that I can't even login to change it.....thoughts?
Yes; I have full cpanel access.
Well that's a good start.
You should have a tool to configure PHP with, we can start there. PHP.ini EZ Config is what it's called. Check the memory limits there, I don't think the answer is in there, but it's a place to start to make sure there isn't something wierd in there.
If the problem is with MySQL, then I don't believe cPanel has a tool to configre that. Contacting your hosting provider is going to be necessary.
Since you have direct database access, you might be able to deactivate those exorbitant 'filters' by removing the corr. record in the database. That should reduce the memory consumption allowing you to go in to the Moodle web interface.
mysql> select * from mdl_config where name like '%textfilters';
| id | name | value |
| 386 | textfilters | filter/mediaplugin |
1 row in set (0.00 sec)