We have a problem where Moodle is sometimes unavailable for several seconds, or sometimes a few minutes. It's rare and unpredictable enough to usually be dismissed as a "fluke," but we need to solve it somehow. I wonder if others have had similar experiences.
In particular, it seems that these "unavailable" moments tend to center around the MySQL database; test PHP pages that just echo text seem to work in such cases. I was thinking of putting up a test page, running as a cron job, to see what times in the day the database becomes unavailable, with what error (if there is an error), and how frequent the problem really is.
However, I thought I should first check if there's anything already built into Moodle I can use, instead of reinventing the wheel. When I search the site about logs or logging, in Moodle that seems to refer to activity reports. Is there any place in Moodle where the application will log to a file if it's unable to access the database, or if it takes too long to access it?