moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
67 stars 60 forks source link

Fatal error: Allowed memory size exhausted (in combination with the steam theme installed in the backgorund) #760

Closed lambdadade closed 3 days ago

lambdadade commented 3 days ago

After installing boost_union_moodle45_2024100701.zip and activating the plugin the admin user no longer can access the website. Students and Guests can. Debugging shows Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 45056 bytes) in /var/www/moodledata/localcache/mustache/1731972777/boost_union/__Mustache_f88dc471bd71c619dff5222848f518e8.php on line 50

Increassing the memory limit (just for testing ) to 2048M does not solve the issue. Seems like a memory leak

abias commented 3 days ago

Hi @lambdadade ,

thank you for reporting this issue. I am sorry to hear that Boost Union seems to bring your Moodle down.

However, we have not experiences such an issue before and are thus struggling to reproduce and fix it.

To allow us to understand what's going on, can you please pick that /var/www/moodledata/localcache/mustache/1731972777/boost_union/__Mustache_f88dc471bd71c619dff5222848f518e8.php file from disk and post it here so that we can see which Mustach file is causing this memory leak. As soon as I see the file, I might come up with more questions.

Cheers, Alex

lambdadade commented 3 days ago

Hi @abias sorry - I guess it's not the fault of your theme.

In the morning I removed the stream theme too which I have tried before. And the error disapears. Inststalled it again and debugging shows lib/mustache/src/Mustache/Context.php as the issue. Removing the stream theme solves the issue.

Installing it again and switching to boost_union there after triggers it again. So I guess I should report that issue there. Stream is an boost child theme too. Maybe it is unwise to install several child themes in the background?

lambdadade commented 3 days ago

just renamed the topic to make it more clear. The original error was Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 69632 bytes) in /lib/mustache/src/Mustache/Context.php on line 211

abias commented 3 days ago

Hi @lambdadade ,

thank you for this clarification. Normally, it should not be a problem to install multiple Boost child themes in the same Moodle instance. However, the stream theme states in its README that it is inspired by Boost Union and other Boost child themes. I did not investigate it, but maybe there is some code duplication / collision between both themes when installed in the same Moodle instance which triggers this exception.

But given the fact that you stated that this exception does not appear when you just install Boost Union, I would close the issue for now.

Cheers, Alex