Our Moodle site (Moodle 3.9) is gradually getting larger, and recently we have started to have issues with backups of some of the larger courses (both the daily automated backups, and backups made manually by course admins) failing.
We have a good understanding of most of the PHP config settings that often need to be changed as a site gets larger:
max_execution_time
post_max_size
upload_max_filesize
(the two size settings needing to be at least as large as the largest file that you will need to upload)
There is also
memory_limit
, which we have also recently increased from the default 128M to (arbitrarily) 512M, which may also have helped, but we are unsure how to guesstimate a sensible value for this (presumably you do not want to make this too large, even if you have quite a lot of RAM, as there are likely to be a number of Apache/PHP processes running at the same time, depending on number of users, which will all add up and would have the total system RAM shared between them?). Does this setting also need to be at least as large as the largest file upload, or does it depend on other things instead?Regarding the DB config (in our case, MariaDB), we are aware that
max_allowed_packet
may now be a limiting factor. Until now, our DB has been using the default 16M value. Should/must this setting also be increased in lockstep with the PHP post/filesize limits, or is it not actually related to those settings? (I am assuming that Moodle stores all uploaded files as files in the filesystem, and not within the database, so there may be no or little correlation between these settings?)Might we also need to increase
max_connections
from the default (and slightly odd) 151?Our server stats are as follows: we don't know exactly how many students are using the server at the same time, but we think it will be something between 100 - 500 students at a given time, from a larger total number of enrolled users (we will obviously need to look into this further, now that use is growing more); we have 16 GB RAM but rarely seem to use more than 1 – 2 GB (possibly because of the current PHP/DB limits), 4 CPUs (rarely at more than ~20% load), and plenty of file storage space.
Thank you if you can offer any advice.