After setting up several Moodle + MSSQL sites, we have finally solved the problems.
Something about MSSQL Isolation Levels: https://msdn.microsoft.com/en-us/library/ms378149%28v=sql.110%29.aspx
We run these two commands on our MSSQL:
ALTER DATABASE 'moodle' SET ALLOW_SNAPSHOT_ISOLATION ON;
ALTER DATABASE 'moodle' SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;
And the "Error reading from database" errors disappear. Now we are getting 503 Service Unavailable and 500 Internal Server Error errors instead, so it's just about tuning the apache to handle high load.
Hardware and performance
Getting 404 errors when load testing Moodle 2.9 with only 10 concurrent users
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.