error 500 when D8 site placed in maintenance Unless connected to admin , putting site in maintenance generate a 500 error.

I have followed Drupal 8 maintenance page theming instructions, modifying the settings.php and adding the template to the theme but it is still not working .

How can i debug this ?
BEGINNER VERSION

Maintenance mode is working in general. Use the following direction of debugging: FROM "untouched" Drupal TO your state.


Download a same core version of Drupal as you have. Turn on maintenance mode (without changing anything else), visit the page with a non-admin user. 
Apply the settings in your link about (Drupal 8 maintenance page theming ) visit again the page with a non-admin user.


Whenever the site brakes you know where the problem resides. 

ADVANCED VERSION

500 errors are always logged in Drupal. Check what says the "recent log messages" with admin. 
Also you can set in your settings.php

$config['system.logging']['error_level'] = 'verbose';


This won't just show 500 error, but also tell the reason.