I'm on magento 1.8 and have a really strange thing happening at 5am every morning... a maintenance.flag appears in my root folder, putting the site into maintenance mode...
I have tried changing all the passwords etc but it still happens. In the access logs, all I can see is the cron.php (which runs every minute) running at a few seconds after 5am
I've also checked the error logs etc, no idea what is causing this. I've also changed FTP password and root passwords for the server.
Also what happens is I get the attached error when I try to access admin. I restart SQL and it starts working again...