Error on my course menu

Error on my course menu

Jonathan Herrera -
回帖数:10

Hi to everyone, thanks in advance.

I have a problem with My courses menu, with administrator user the menu work fine but with student user the moodle load is very large and show the next errors. 

Fatal error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/gap/lib/classes/context.php on line 466

Fatal error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Fatal error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Fatal error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

and the error log of apache show that

tail -f gap-error_log

[Sun May 28 03:22:57.532308 2023] [proxy_fcgi:error] [pid 21405] [client 103.150.136.192:51362] AH01071: Got error 'Primary script unknown'

[Sun May 28 03:52:32.426297 2023] [proxy_fcgi:error] [pid 21405] [client 134.209.194.62:50894] AH01071: Got error 'Primary script unknown'

[Sun May 28 03:52:33.875861 2023] [proxy_fcgi:error] [pid 21409] [client 134.209.194.62:50924] AH01071: Got error 'Primary script unknown'

[Sun May 28 08:12:33.457312 2023] [autoindex:error] [pid 26505] [client 52.167.144.25:43328] AH01276: Cannot serve directory /var/www/html/gap/lib/yuilib/2in3/2.9.0/build/yui2-skin-sam-datatable/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

[Sun May 28 16:03:49.322551 2023] [autoindex:error] [pid 2310] [client 52.167.144.125:5056] AH01276: Cannot serve directory /var/www/html/gap/lib/yuilib/2in3/2.9.0/build/yui2-colorpicker/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

I try to disable all the plugins and uninstall language packs. Also the memory_limit in php.ini are in 8192M, next the versions of moodle, php, apache, mysql and OS  

Moodle 4.2+ (Build: 20230519)
OS:Amazon linux 2
Kernel: Linux 4.14.314-237.533.amzn2.x86_74
Architecture x86-64
webServer:Apache/2.4.57
PHP Version 8.1.16
MySql version 8.1.16

I review the requirements for moodle and I see that 4.2 are no compatible yet with PHP 8.1 and mysql 8.1 (can this be the problem?)

If I try to refresh in my course menu, sometime I get the next error

Error

Timed out while waiting for session lock.

Wait for your current requests to finish and try again later.

Debug info:

Error code: sessionwaiterr

Stack trace:

line 2098 of /lib/dml/mysqli_native_moodle_database.php: dml_sessionwait_exception thrown

line 176 of /lib/classes/session/database.php: call to mysqli_native_moodle_database->get_session_lock()

line ? of unknownfile: call to core\session\database->handler_read()

line 45 of /lib/classes/session/handler.php: call to session_start()

line 160 of /lib/classes/session/manager.php: call to core\session\handler->start()

line 142 of /lib/classes/session/manager.php: call to core\session\manager::start_session()

line 852 of /lib/setup.php: call to core\session\manager::start()

line 37 of /config.php: call to require_once()

line 30 of /index.php: call to require_once()

回复Jonathan Herrera

Re: Error on my course menu

Sandipa Mukherjee -
Hi Jonathan Herrera, You can go to your Moodle data folder just delete the session, temp, and local cache folders from there. After that purge the cache from the site administrator. See the result from Moodle users.
This process helps me earlier.
 
Thanks and regards,

Sandipa Mukherjee
 
回复Sandipa Mukherjee

Re: Error on my course menu

Jonathan Herrera -
Thanks Sandipa, I delete the folders and purge all cache and the error shows again.

Update: I downgrade the PHP version to 8.0
回复Jonathan Herrera

Re: Error on my course menu

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
> I review the requirements for moodle and I see that 4.2 are no compatible yet with PHP 8.1 and mysql 8.1 (can this be the problem?)

Where? https://moodledev.io/general/releases/4.2 says PHP 8.1.x supported. MySQL 8.0 to Latest. It could be the "max_input_vars must be >= 5000" thing mentioned there.
回复Visvanath Ratnaweera

Re: Error on my course menu

Jonathan Herrera -
Thanks, yeah I review and the requirements not are the problem. Aboout max inputs vars is in 5000 and show the same error.

Maybe about error log is a possible plugin the cause of the problem?

thanks 
回复Jonathan Herrera

Re: Error on my course menu

Ernani Joppert Pontes Martins -
Same here, apparently setting the notification time lower than the session timeout works fine and removes the warning away.
回复Ernani Joppert Pontes Martins

Re: Error on my course menu

Wail Abualela -
I am facing the same issue and I want to try your fix, what do you mean by the "notification time" so far I found the session timeout which is the default 8 hours, but I did not find the "notification time".
can you please give us more details? THANKS