Skip to main content
MoodleLMSRAM
MoodleLMSRAM Partner Disclosure: Outbound /go/ links marked rel="sponsored" may earn a referral commission at zero extra cost (Partner Disclosure).
Stack Matrix Hub (10)

max_input_vars & post_max_size Tuning for Moodle Gradebook

Prevent silent gradebook truncation and large assignment upload failures by sizing max_input_vars=5000 and post_max_size in PHP-FPM.

max_input_vars=5000 · post_max_size=128M · max_execution_time=120

max_input_vars & post_max_size Tuning for Moodle Gradebook
Telemetry verified 2026-10-25 by ExamLoad Systems.

Why Moodle 4.x Fails Moodle Environment Checks at 1,000 Input Vars

PHP ships with max_input_vars = 1000 by default. In a Moodle course with 150 students and 12 graded quiz items, saving the Single View or Grader Report submits over 1,800 form fields—causing PHP to silently drop trailing student grades.

Setting Safe Pool-Level Limits Without Enabling DoS Hash Collisions

Moodle 4.x explicitly recommends max_input_vars = 5000 in php-fpm.conf. Pair it with upload_max_filesize = 128M, post_max_size = 136M, and nginx client_max_body_size 140M so large SCORM or video submissions match end-to-end.

Measured Thresholds & Configuration

PHP DirectivePHP DefaultMoodle 4.x Exam BaselineFailure Symptom if Default
max_input_vars10005000Grader report drops student rows
upload_max_filesize2M128MSCORM / MBZ upload rejected
post_max_size8M136MBlank POST on assignment submit
max_input_vars=5000 · post_max_size=128M · max_execution_time=120 Launch ChemiCloud ($4.49/mo)UltaHost VDS ($41.50/mo)