Magento Service Temporarily Unavailable

Magento locks you out of admin and your Magento store front shows the following error message:
Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Magento has created a file called maintenace.flag in the main magento directory due to a task it was performing and has not deleted the file following the completion of that task. For example, perhaps a module from Magento Connect failed to install correctly. Magento checks for the files existence and if found the "Service Temporarily Unavailable" message is displayed. Delete this file and your Magento store should return to normal.

If your Magento store still displays the "Service Temporarily Unavailable" message after deleting the maintenance.flag file or no maintenance.flag file was found, then delete the cache and sessions files and your Magento store will return from maintenance mode.