My server is on iWeb canada and has 128 GB ram (atleast 90 GB is free when I get this error) , its a physical server on which multiple Moodle sites are hosted . The response time is very slow at times, especially during peak hours. Recently we upgraded one instance to Moodle 2.7 and have been getting 500 server error when we try to create a course in one particular course (it works fine in other courses). Debugging shows
[14-Dec-2015 18:55:40 UTC] Database transaction aborted automatically in /home/xxxxxxx/public_html/xxxxxxxxxxxx/course/modedit.php
[14-Dec-2015 18:55:40 UTC] Default exception handler: Error writing to database Debug: Lock wait timeout exceeded; try restarting transaction
SET cacherev = (CASE
WHEN cacherev IS NULL THEN 1450119219
WHEN cacherev < 1450119219 THEN 1450119219
WHEN cacherev > 1450119219 + 3600 THEN 1450119219
ELSE cacherev + 1 END) WHERE id = ?
0 => '20',
I even tried increasing the innodb lock timeout to 180 still no luck :S and the page literally takes 5 minutes of loading before it shows this error.
In my apache conf I have a timeout of 60 , MaxClients are 990 I have been told this is important for us when I suggested to lower this.
I have tried optimizing mysql to the best of my knowledge after reading
Can someone point me in the right direction ? Any help is appreciated