Very slow to load any Moodle 4.3.3 pages in Docker

Very slow to load any Moodle 4.3.3 pages in Docker

by Mehmet Ali Ongan -
Number of replies: 4
I installed Moodle 4.3.3 (Build: 20240212) with PHP 8.1, MariaDB on Docker. Too much time to loading any page something like 40 second or 1.30 minute. I am sharing network and debug result. Pease help, i can not do any developing on this system..




Average of ratings: -
In reply to Mehmet Ali Ongan

Re: Very slow to load any Moodle 4.3.3 pages in Docker

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There is a web service request there that is taking 13 seconds to respond. If you select that request and look at the URL you should be able to see which web service function is being called.

Average of ratings: Useful (1)
In reply to Mark Johnson

Re: Very slow to load any Moodle 4.3.3 pages in Docker

by Mehmet Ali Ongan -


yeah i think i found that request and it's still too much. my friend did same installing and his page is loading on two second. i can not make any development at this sitution please help
In reply to Mehmet Ali Ongan

Re: Very slow to load any Moodle 4.3.3 pages in Docker

by Ron Meske -
Picture of Particularly helpful Moodlers
Have you verified that your system is setup for Docker?

Does your computer have hardware virtualization and is it enabled?

The file system is one of the critical pieces.  Make sure you are using VirtioFS and that your computers file system is using the optimal one for the OS you are are running.  When I first setup Docker to run entirely from an external drive I was aiming to be able to switch the external drive between Windows and Mac systems.  I found it ran extremely slowly and ended up reformatting the drive as APFS for my Mac and it now runs about the same speed as running Moodle natively on my Mac without Docker.


Finally, check if you can use GPU acceleration.  That will also improve performance.
In reply to Mehmet Ali Ongan

Re: Very slow to load any Moodle 4.3.3 pages in Docker

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers
How have you set things up? Are you on a PC ? Mac?
How Is the Moodle source code accessed from the web server

I found docker + moodle unworkably slow on Mac.
But it runs very nicely on windows + wsl (windows subsystem for linux).
The source code is in WSL (ubuntu 22) and the webserver / DB etc are in the docker container.
I used the moodle-docker scripts to get set up
https://github.com/moodlehq/moodle-docker