WordPress goes into maintenance mode when an update is initiated.
While performing updates, WordPress will typically create a temporary .maintenance file that is placed in the root folder of your installation. This file then displays a message to your visitors that says, “Briefly unavailable for scheduled maintenance. Check back in a minute.”
Once an update is complete, WordPress deletes the .maintenance file and takes your website out of maintenance mode.
However, sometimes due to a slow WordPress hosting server response or exhausted memory problems, the update script will time out and interrupt the process. When this happens, WordPress does not get a chance to take your site out of maintenance mode and your site will continue to display the maintenance notice to your visitors.
The fix is a simple one and involves you connecting to your website via FTP where you can manually delete the .maintenance file.
Once the .maintenance file is removed, your site will come out of maintenance mode, and the error will be no more.
If you are not sure how to use FTP, then you can also remove the file by using the file manager in your WordPress hosting control panel, and then deleting the .maintenance file inside the file manager.
To reduce the chances of this happening try to avoid updating all plugins or themes at the same time and instead update each plugin or theme individually.