Search code examples
craftcms

CraftCMS 3.6.4 - 503 Error when logged out of control panel


Getting a 503 Service Unavailable when trying to access the site (both local and remote) only when I'm not logged in to the control panel.

The error appears to stem from vendor/craftcms/cms/src/web/Controller.php line 63:

 protected $allowAnonymous = self::ALLOW_ANONYMOUS_NEVER;

On line 152 the code checks the value of $allowAnonymous:

   if (!($test & $allowAnonymous)) {

And on line 165 inside the if block, it throws an exception:

  throw new ServiceUnavailableHttpException();

How do I tell Craft to always allow guests access to the site? And why is it not the default behavior?


Solution

  • In config/general.php add:

     'isSystemLive' => true