Hi all,
we are running a Moodle instance with approximately 15,000 users, and we are currently facing a technical issue that we have been unable to resolve on our own (unexpected 500 internal server errors).
Main issue:
Users get 500 internal server errors (up to 2% of all requests in IIS logs).
If there is about 130 concurrent users logged-in, almost each Moodle page sometimes ends with 500 internal server error.
But error appears if there is only a few concurrent users (sometimes).
Many of 500 errors are related to opening SCORM, or some SCORM content. But not 100%.
Problem this there is no regularity or rule in 500 error appearance.
Environment:
- Windows Server + IIS + SQL SERVER
- PHP 8.3 NTS
- Moodle 4.4.X (resp. 4.5.X for another, one node solution with same error)
- 2 nodes architecture:
- 2 application servers (RAM 24GB, CPU 8 cores)
- shared file cluster for Moodledata storage (changed from network file cluster to shared local disc, but it didn't help)
- one technical windows domain account for connection to DB (windows authentication) and to access to /moodle and /moodledata
- main settings of FastCGI, PHP, Opcache, AppPool see in attached file
- config.php see in attached file
- database is used for session storage
- DB locks are used
What is different from other implementations:
- 2 nodes (but I dont believe its a problem, because we get the same errors on different, one node Moodle LMS
- caches folders (/cache, /localcache, /temp) are placed on application server, instead of /moodledata folder. If we place them to /moodledata, Moodle is very very slow, see benchmark results in attached file.
- high score in report Benchmark tests, see benchmark results in attached file
- specific environment - maybe something in infrastructure, TCP/IP, HTTP, firewall.. But we are not strong in these areas.
Logs:
- PHP error is clean (no errors)
- IIS logs shows errors with codes:
- 500 0 2147500037 (if cache folders are placed on application server)
- 500 0 64 (if cache folders are inside /moodledata)
- request tracing failure is enabled (each day hundreds of XML files generated)
I can provide all logs needed.
We appreciate any help!!
Thanks.

