Preparing Moodle for exam-day quiz load: what changes at the start time
If your students all open a quiz within the same few minutes, the risk to your Moodle site is concentrated at the start time, not spread across the day. Preparing for exam-day quiz load means identifying what each attempt start writes, reads and locks, then testing that path at the cohort size you expect before the window opens. Ordinary browsing spreads requests out. A scheduled start does not, so a site that feels fine on a normal Tuesday can stall in the first minutes of an assessment.
Teams usually need this work when the stakes or the numbers justify it: high-stakes final exams, accreditation or certification assessments, placement tests and large cohorts that start together. When a student begins an attempt, the core quiz module creates a quiz_attempts record, generates the question usage for that attempt, and writes the question state rows that record what each student has been shown. Moodle also writes to the session, reads cached definitions for quiz and question data, and may take session or other locks while it does so. Multiply those writes by several hundred simultaneous starts and the database, session store and cache layer all see a burst that normal page views never produce.
Ask your hosting or Moodle partner to confirm, for your exact Moodle version and quiz settings, which tables and stores each start touches and how many writes one start generates. Confirm the expected peak concurrency, the number of questions per attempt, whether questions are randomized, and whether the quiz uses a time limit or an access rule such as a password or IP restriction. These answers decide how much headroom the database, session store and web tier need, and they set the test scenario you will run in the sections that follow.
Configuration options and when each fits
This table compares the main levers for absorbing simultaneous quiz starts: session storage, cache mapping, read replicas, load balancer stickiness, scheduled task pausing and a dedicated exam cohort. Read each row for the situation it fits, what it costs you, and what your platform team must confirm before exam day. No single lever is sufficient on its own, so most sites combine several.
| Option | Fits when | Trade-off | Confirm with the platform team |
|---|---|---|---|
| Database sessions | Small peaks, a single web node, or a site where sessions are light and session locking is not a known bottleneck | Simple to run, but every session read and write adds load to the primary database during a surge | Current session lock warnings in the logs and the database connection headroom at peak |
| Redis session handler | Several web nodes or a large expected start burst, where session traffic is a measured share of database load | Adds a stateful service to operate and secure, and session locking behavior must be tested under concurrency | Redis sizing, TLS and authentication, lock timeout settings, and whether the team has tested failover |
| Cache store mapping (APCu, Redis, file) | Hot request and application data is re-read on every page, and cache misses cluster at quiz start | APCu is local to each node and does not help a shared cluster, Redis adds network hops, and file caches are slower under concurrency | Which cache definitions map to which store, and whether the mapping was tested under the expected load |
| Database read replicas | Reads dominate and the replica lag is small enough that students see current quiz state | Replicas do not reduce writes, and quiz attempts write heavily, so replicas help only part of the load | Replication latency tolerance, which tables are excluded from replica reads, and failover behavior |
| Load balancer session stickiness | You want to keep a student on one node to reduce cross-node session handling | Stickiness can concentrate load on one node and complicates node removal during an incident | Whether shared sessions are in place, health check design, and client IP forwarding for IP-restricted quizzes |
| Pausing scheduled tasks | Heavy cron jobs such as reports, backups or bulk processing would run during the exam window | Pausing gives headroom but can delay jobs that other processes expect, and a missed pause is easy to overlook | Which tasks are scheduled in the window, who has authority to pause them, and how they are resumed |
| Dedicated exam cohort or cluster | High-stakes exams with a known cohort size, or institutions that must isolate exam traffic from daily use | Extra infrastructure to run, keep patched and test, and the cohort must be kept in sync with the main site | Whether the cluster is sized for peak, how data is synchronized, and how it is decommissioned after the exam period |
How to prepare the site before exam day
This sequence takes a Moodle site from version confirmation to a rehearsed exam-day configuration, with a check at each step so the team knows when to move on. Each stage removes a source of surprise before students log in.
Confirm the Moodle version and server stack
Record the Moodle version in use and compare it with the requirements for that release: the 64-bit PHP version range, the supported database and its version, and the web server document root. For Moodle 5.1 the document root must point to the /public directory, and the PHP and database minimums are listed in the release notes. Whoever owns the platform signs off the comparison. Done means every server component is on a version the release notes list as supported, and any gap has a dated fix in the change log.
Baseline the current site performance
Before changing anything, capture how the site behaves on an ordinary busy day: page response times, PHP worker use, database connections, slow query log entries, cache hit rates and session lock warnings. Use the performance report and profiling tools available in Moodle, and record the results with the time window and the number of active users. Done means the team has a written baseline that later tests can be compared against, including the known slow pages.
Build a load test that matches real quiz behavior
Script a test that reproduces the actual exam pattern: many learners starting the same quiz within a short window, opening attempts, answering questions and triggering autosave at the interval the quiz uses. Include login through the real identity path, and include a realistic share of learners who reconnect or refresh. Ask the course team for the expected cohort size, quiz settings and start window, and treat any figure they cannot provide as an assumption to record. Done means the script runs against staging, produces repeatable results and the scenario matches a written exam plan.
Tune sessions and caches for the load
Review where sessions are stored and how cache definitions map to stores, then change only what the baseline and first test point to. Session locking and cache store choices are the usual constraints during quiz starts, so each change should name the setting it touches. Keep a record of the previous values so each change can be reverted. Done means the test rerun shows the targeted bottleneck has moved or cleared, with no new errors in the logs.
Check database connections and storage headroom
Confirm that the database connection limit, the connection pool and the maximum concurrent PHP workers can cover the peak your load test produced, with margin for other users of the same server. Check free disk space for the database, the data directory and the temporary and log directories, and confirm that the backup window does not fall inside the exam window. Done means the peak test leaves measurable headroom on connections, memory, CPU and disk, and the figures are written next to the limits they were measured against.
Pause or reschedule heavy scheduled tasks
List the scheduled tasks that run during the exam window, such as backups, report generation, bulk imports, indexing and large cleanup jobs, and move them outside the window or pause them in the task settings. Record each change and who approved it so it can be restored afterward. Done means the scheduled task list for the window has been reviewed line by line, and the cron run times show no heavy task scheduled within the exam period.
Rehearse on a staging copy
Restore a recent copy of the production database and data directory to staging, apply the same configuration and run the full load test again, including the scheduled task changes. Run a short functional walkthrough as a learner and as a proctor or teacher. Done means the staging run matches the production configuration, the functional walkthrough passes, and the team has agreed the rollback steps for each change.
Repeat the test after each change and freeze the configuration
After every configuration change, rerun the same load test and compare the result with the baseline and the previous run. Once the results meet the targets the team agreed, freeze the configuration, record the final values in version control or the change log, and block further changes until the exam window closes. Done means the last test run is stored with its settings, and the frozen configuration matches what was tested.
How the parts fit during a quiz start
The flow starts with students sending quiz start requests through the load balancer, which spreads them across the web nodes. Each node reads and writes the shared session store and cache store, and quiz data comes from the primary database, with reads optionally offloaded to a replica. Attachments and uploaded files are served from shared file storage. The cron and task runner sits off the request path and should be paused for the window, so the check to make before exam day is that no scheduled job competes for the same database and file resources.
Request path from students through web nodes to shared stores, with cron paused off-path.
How to load test quiz starts without distorting the result
Staging is the place to find software and configuration faults before they reach students. It should run the same Moodle version, PHP and database engine, cache and session stores, and web server layout as production, with a dataset large enough that quiz tables, the question bank and the logstore are not trivially small. Staging tells you whether the quiz start path works under concurrency, whether session locks queue up, and whether the configuration you planned actually takes effect. It cannot tell you how production behaves at peak, because hardware, network paths, shared database neighbors and real student behavior differ. Use synthetic accounts generated for the test, never a copy of real learner records. Capture these metrics:
- Response time at quiz start: the time from the start request to the attempt page, at the 95th percentile and the maximum, not just the average.
- Session lock waits: how long requests wait for a session lock, and whether warnings appear in the log.
- Database connections: peak active connections against the configured limit on the database server.
- Error rates: HTTP 5xx responses, PHP fatal errors and timeouts per minute.
- Scheduled task activity: whether cron or adhoc tasks overlap with the test window.
Record the Moodle, PHP and database versions and configuration used for each run so results can be compared later.
A rehearsal runs on a copy of production restored into an environment with the same topology: web nodes, cache and session servers, database and file storage. Because the data volume and table shapes are real, this is the strongest test of database headroom, quiz attempt table growth and the effect of indexes and replicas. It still cannot prove the live traffic pattern, since you control the arrival rate and nothing else competes for the same network or hypervisors. Privacy controls matter most here. Copies of production contain personal data, so restrict access, mask names and email addresses, disable outbound email and notifications, and suspend external integrations such as grade passback or SSO sync before the environment is started. Create dedicated test accounts with clearly marked identifiers and remove them after the rehearsal. Capture the same metrics as staging, and add:
- Attempt creation rate: attempts created per second compared with the rate the exam schedule requires.
- Question loading time: time to render the first page of questions for a quiz with the planned question count.
- Cache hit ratios: whether cache misses rise sharply once the quiz starts.
- Replication lag: if read replicas are in use, lag during the write burst.
Confirm with your database and hosting team how long the restore takes, since that determines how often you can rehearse.
A limited live check runs against the production site during a low-risk window, using a small number of real staff or test accounts and a quiz that no student will sit. It proves that the production network path, load balancer, TLS termination, IP forwarding and firewall rules behave as the rehearsal assumed, which neither staging nor a cloned copy can confirm. It cannot prove behavior at full load, and it can disturb real users if it is run carelessly, so agree the window, the affected users and a stop condition with the business owner in advance. Use only accounts created for testing, flag them so reports exclude them, and make sure the test quiz does not generate grades, certificates or notifications for real learners. Watch these signals during the check:
- Start page latency: whether the path through the load balancer adds delay compared with the rehearsal.
- Client IP visibility: whether logs and any IP-restricted quiz settings see the correct source addresses.
- Error rates on the production edge: 5xx responses from the proxy and the application.
- Alert activity: whether monitoring fires and reaches the on-call team as expected.
- Cleanup status: confirm that test attempts and accounts are removed or disabled afterward.
Treat a clean live check as confirmation of the wiring, not as a capacity result.
Which scheduled tasks to pause and which to keep
Scheduled tasks compete with quiz traffic for PHP workers, database connections and disk I/O in the same hours students sit their exams. Each decision below asks whether a task protects the exam or only consumes resources during it, and each needs a named owner before the window opens.
Pause log and report generation
Report builders, log exports and statistics jobs read large tables while students are answering questions. Pausing them frees database capacity for quiz writes. Ask the Moodle administrator to list every task under the reports and logging components and record which ones they disable, along with the time they re-enable each one after the exam ends.
Keep quiz integrity tasks running
Tasks that finish open attempts, clear abandoned quiz data or enforce time limits protect the exam itself. Turning them off can leave attempts stuck in an unfinished state or let results drift. Confirm with the quiz owner which cleanup and attempt tasks must stay on, and test one full attempt that runs past its time limit during rehearsal.
Keep session cleanup active
Session cleanup removes expired sessions so new logins do not stall behind stale rows or files. Disabling it for a long window grows the session store while concurrent starts peak. Check the session store size and expiry settings before the window, and confirm who will watch the store during the exam.
Defer backups and large file jobs
Scheduled backups, file trash emptying and bulk file cleanup read or rewrite large amounts of data. Move them to a window after the last exam session, and confirm the backup job is not triggered by a manual action during the exam. A backup started during peak load can slow every page on the site, so block manual backups in the runbook too.
Check cron lock behaviour in clusters
In a multi-node setup, each task should run on only one node at a time. If the lock factory is misconfigured, two nodes can run the same heavy task together, which doubles its load. Before the window, confirm which node runs cron, how locks are stored and what happens if a node fails mid-task. Test this on a staging cluster.
Avoid bulk course operations
Course restores, bulk enrolment syncs, course resets and mass grade recalculations can lock the same tables that quiz attempts write to. Freeze these operations for the window and agree on an approval path for any urgent change. Ask the administrator to confirm the list of bulk actions that are blocked and who can override the freeze.
Questions buyers ask before preparing a Moodle site for exams
What does preparing a Moodle site for exam-day quiz load cost?
No price is published for this work, and the cost follows from a written scope. The main cost components are the people doing the load tests, the configuration and tuning of sessions and caches, the database capacity work, and the runbook and rehearsal. Some costs are one-time, such as the initial load test and configuration changes, while others recur, such as repeating the test before each major exam window or after a Moodle upgrade. The biggest drivers are the number of concurrent quiz starts you expect, how many web nodes and database servers already exist, and how many quizzes run on the same schedule. Ask for each cost component to be listed separately, with the testing rounds, environments and retest work named.
How long does it take to get a Moodle site ready for exams?
The timeline depends on how much of the stack is already measured and how far the site is from the expected peak. Preparation usually runs through baseline measurement, a load test against a production-like environment, fixes to session handling, cache mapping and database capacity, a retest, and a rehearsal of the exam-day runbook. Each step can require a change window, so calendar time often matters more than hands-on hours. Ask a partner to state the phases, the dependencies on your change board, and the date by which the exam calendar needs to be frozen. A timeline without those dates is not yet a plan.
What does the institution's team need to provide for this work?
The work needs access and decisions from several groups. Infrastructure staff provide test environments, load balancer and web node access, and database capacity information. Moodle administrators provide the exam course structure, quiz settings, the expected number of learners per session and the scheduled tasks that run on the site. Security or network teams confirm any IP-restricted quizzes, proctoring endpoints and firewall rules that the load test must reflect. Someone must also own the decision to pause heavy scheduled tasks during exam windows. Request a written list of these inputs in the scope so gaps are visible before testing begins.
Can our internal team prepare Moodle for exam-day load on its own?
Yes, if the team has experience with Moodle administration, PHP-based web stacks, the database engine in use, and a load testing tool. The hard parts are usually not the tool itself but interpreting results: separating PHP worker saturation from session lock waits, cache misses and database contention, and knowing which settings change safely in production. Teams that have never run a full exam-day rehearsal often underestimate the runbook and communication work. A partner can add value by running the test, tuning the configuration and documenting the runbook, but internal ownership of the final decisions is still required. Assess honestly which of these skills you already have before deciding.
Which Moodle version and server requirements affect exam preparation?
The Moodle version and its server requirements set the baseline for everything else, so confirm them before testing. Moodle 5.1 requires 64-bit PHP 8.2 or later, with 8.3 and 8.4 also supported, and it supports PostgreSQL 15, MySQL 8.4, MariaDB 10.11 or Microsoft SQL Server 2017 or later. Moodle 5.3 requires 64-bit PHP 8.3 or later and PostgreSQL 17, MySQL 8.4, MariaDB 11.4 or SQL Server 2019 or later. Ask whether any upgrade is scheduled near an exam window, because load results from one version do not transfer cleanly to another. Check the Moodle releases page for current support dates before fixing the version for the exam period.
What should we ask a partner to include in a written scope?
Ask for a scope that names each deliverable and the evidence it produces. It should cover the target concurrent quiz starts, the test scenarios and user journeys, the environments used and how they differ from production, the session and cache configuration changes, the database headroom checks, and the list of scheduled tasks to pause and how they resume. Request the exam-day runbook, the rollback steps, the retest criteria and the named roles during the exam window. Also ask what is excluded, who owns production changes, and how results are reported. Most engagements are fixed-scope, so scope, deliverables and timelines should be agreed in writing before work starts.
What risks should we raise before an exam-day load test?
The main risks are testing against an environment that does not match production, running load tests that disturb live students, and making configuration changes without a rollback. Another common risk is assuming that adding web nodes solves the problem when session locking or database connections are the actual limit. Ask how the test traffic will be isolated, which metrics will be watched, who can stop the test, and how sessions, quiz data and backups are protected during testing. Also ask what happens if the rehearsal fails, because the decision to proceed with an exam window should be made in advance and recorded.
Limits to confirm in your own environment
The figures that decide whether a Moodle site can carry exam-day load are specific to your hosting, release and quiz settings, so none of them can be taken from a general guide. The cards below list what to verify and who can confirm each item. Work through them before you set a load target or book an exam window.
Concurrency your site can reach
Confirm the number of simultaneous quiz starts and in-progress attempts your site must handle, and the peak window each exam produces. Then check what your current web nodes, PHP workers and session store can sustain under that count. Do not assume a capacity figure from another institution. Treat any number you have not measured on your own stack as unknown until a load test on a production-like copy shows it.
Moodle and database versions
Confirm which Moodle release you run and whether it is on a supported branch, since security support windows differ by release. Check the PHP, PostgreSQL, MySQL, MariaDB or SQL Server version against the requirements for that release. A version mismatch found during exam week leaves no room to fix it, so verify it in the planning phase.
Moodle releasesHosting constraints for planned changes
Confirm whether your hosting allows the changes this plan depends on, such as a Redis service, a cache store, a read replica, changes to web server configuration or a second web node. Ask who controls the load balancer, the database and the file share. Shared hosting or a managed platform can block changes that look small on paper. Record each restriction so the plan does not depend on something you cannot change.
Vendor support for your stack
Confirm which parts of the stack are covered by a support contract, including the database, the cache service, the load balancer and any managed hosting provider. Ask each vendor whether their support covers your version and your topology. Gaps in support matter most when a fault appears during a live exam, so document who you call and how.
Quiz settings used in exams
Confirm the quiz configuration each exam uses, including question count, time limits, attempt rules, question randomization, feedback display, and any IP restriction or browser security setting. Each setting changes how many writes and reads a student generates. Load a test that matches these settings, not a default quiz, so the results reflect the real exam.
No supported load figure in this page
This page does not provide a supported concurrency number, response time or capacity figure for Moodle. Any figure you see elsewhere depends on hardware, configuration and quiz design that differ from your site. Ask your implementation partner or your own engineers to set your target from your measured results, and record the method used to reach it.
How DeployOpen works on this
DeployOpen plans, builds and hands over exam-day readiness for Moodle inside infrastructure you control, including your cloud accounts, data centers or air-gapped networks. The work starts with a written scope that names the quiz volumes, the exam windows and the systems Moodle depends on, so load testing, cache and session configuration, and the exam-day runbook are all tied to the same agreed plan.
How we scope
- Agree in writing the exam windows, expected simultaneous quiz starts and the courses and quiz settings in scope.
- Map the web nodes, session store, cache stores, database, file storage and load balancer that a quiz start touches.
- Confirm which scheduled tasks and integrations run during exam windows, and who approves pausing them.
How we build
- Build a repeatable load test that mirrors your quiz start, save and submit pattern against a staging copy of your site.
- Configure and retest session handling, cache mappings and database headroom, recording each change and its measured effect.
- Prepare pause and resume steps for heavy scheduled tasks, with the order of changes and rollback points written down.
How we hand over
- Deliver the load test scripts, results, configuration changes and the exam-day runbook with named owners and checkpoints.
- Run a rehearsal with your operators so the escalation path, monitoring views and go or no-go criteria are familiar before the first exam.
- Document the known limits of the platform and the capacity assumptions behind them, so your team can review them independently.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer, timed around your exam calendar and Moodle release cycle.
- Retest after Moodle minor releases, plugin updates or infrastructure changes that could alter quiz performance.
- Provide support for the next exam window, including a fresh load test when enrolment numbers or quiz designs change.

