Forums | Mahara Community

Support /
Upgrade by isolated institution from 22.10.0 to 22.10.4 faild


Daniel Jäger's profile picture
Posts: 8

16 November 2023, 9:02


Dear experts, 

we have updated Mahara 22.10.0 to 22.10.4. We have an isolated institution. 


The upgrade via #sudo -u www-data httpdocs/admin/cli/upgrade.php 


was successful. 

 


After re-entering the page, the separated institutions will appear, which should be confirmed by pressing the "Remove access roles" button. 
After pressing the button, the process runs for approximately 3 minutes. After that, Mahara's message "Page is not accessible" appears. 


Our questions: 1. What services (apache/php-fpn/etc.) are running in the background? What limits in which config files are recommended by you? 

2. Is it possible to start the process, which is started by pressing the "Remove access roles" button, also from the console? 

Additional information: 

The database is approximately 2.4 GB.



Thank you for your help

Robert Lyon's profile picture
Posts: 769

16 November 2023, 14:16

Hi Daniel,

Sorry to hear you had an issue with Isolated institutions in Mahara.

To be able to re-start the process, which was started by pressing the "Remove access roles" you can do the following:

1) Set the site 'Closed' via the Admin home -> Overview page

2) In the database run this command:

UPDATE config SET value = '' WHERE field IN ('dbupdatedforisolatedinstitutions', 'isolatedinstitutionset');

Then login / go to dashboard page as an administrator and you should see the  "Remove access roles"  button again.

If there are issues still please check the error logs to see if there is something helpful and paste it here.

Cheers,

Robert

 

 

 

Daniel Jäger's profile picture
Posts: 8

17 November 2023, 3:16

Hey, 

we got this error: 

AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in /var/www/vhosts/our.url/httpdocs/lib/dml.php on line 557', referer: https://our.ip:our.port/index.php

Which file (config-php-ini??) we have to configurate? 

Thanks for help. 

 

 

17 November 2023, 9:51

Hi Daniel,

Hmm, I'm not sure why you are getting an out of memory issue so lets see if we can diagnose the problem.

When removing the access rules the function "cleandbforisolation_submit" is called and this function fetches all the views needed to be altered and then loops through these.

I suspect there is an issue with the amount that needs to be done by this function and this is causing the out of memory issue.

The first part of the function is to fetch the views to update, so can you check how many records will be involved with the following query on the database:

SELECT COUNT(*) FROM (SELECT va.*, v.id AS viewid, v.title, v.owner FROM view_access va JOIN view v on va.view = v.id AND v.owner IS NOT NULL AND v.type != 'profile' ORDER BY v.owner) AS test;

Then can you add following line to a few places in the lib/institution.php file

error_log('Got to here?');

on line blank lines 1722, 1749, 1776, 1790, 1813, 1837, 1861

And then reset the database to run the system again

UPDATE config SET value = '' WHERE field IN ('dbupdatedforisolatedinstitutions', 'isolatedinstitutionset');

And run it and check the error log to see where the process got up to.

Cheers

Robert

Daniel Jäger's profile picture
Posts: 8

18 November 2023, 3:13

Hey Robert,

thank you very much for help. The next error that occurs is the following: 

Invalid user passed to get_user_for_display bei /var/www/vhosts/our.url.de/httpdocs/lib/user.php:1372PHP message: Call stack (most recent first):PHP message:   * exception() at Unknown:0PHP message: ', referer: https://our.url:our.ip/
5 results