My project worked properly while today get 503 without exception message.
This fix after run php artisan cache:clear
command for one time but after refresh page then get 503 again.
I tried these:
cleared bootstrap/cache files
delete vendor and composer update --no-script
and some solutions but not solve my problem
php artisan cache:clear
php artisan config:clear
php artisan view:clear
CodePudding user response:
finally i found the problem and solve it. the problem was with the maintenance middleware
public function handle($request, Closure $next)
{
if(Cache::has("setting")){
$setting = Cache::get("setting");
if($setting->updating_site == 1){
if(Auth::check() == false){
abort(503);
}
if(Auth::check() && Auth::user()->role != "admin") {
abort(503);
}
}
}
return $next($request);
}
in the middleware check value from setting for maintenance mode and if is true return 503
CodePudding user response:
php artisan up please try this command
I researched a little and solved the problem. The problem is not in laravel installation. The problem is on the server. Restart all services from the WHM interface. The error is resolved.