That is a big step!
Now it reminds me, calendar scrapes events from everywhere and as such an expensive operation. Try an advanced forum search.
Now it reminds me, calendar scrapes events from everywhere and as such an expensive operation. Try an advanced forum search.
Now the next step is to find out whether your site has some special kind of (very intensive) calendar events or there is something wrote wring with (your) Moodle - like a missing index or the database is corrupted or there's a regression that was introduced in a version upgrade.
The latter is unlikely, Moodle 4.1 LTS is well-tested and 4.1.11 is quite recent. You didn't touch the Moodle code, did you? Then one one approach is to go back to where you were, log all the DB calls and look for anything unusual. Work for a detective.