Internal Server Error

Illuminate\Database\QueryException

vendor/laravel/framework/src/Illuminate/Database/Connection.php:857

SQLSTATE[08004] [1040] Too many connections (Connection: mysql, Host: localhost, Port: 3306, Database: emetackc_schoolsms, SQL: select * from `platform_settings` where `key` = app_name limit 1)

LARAVEL 13.21.1
PHP 8.3.36
UNHANDLED
CODE 1040
500
GET
https://www.stanneschool.org/login

Exception trace

1 previous exception
8 vendor frames
Illuminate\Database\Connection->runQueryCallback(string, array, object(Closure))
vendor/laravel/framework/src/Illuminate/Database/Connection.php:857
Illuminate\Database\Connection->runQueryCallback(string, array, object(Closure))
vendor/laravel/framework/src/Illuminate/Database/Connection.php:813
Illuminate\Database\Connection->run(string, array, object(Closure))
vendor/laravel/framework/src/Illuminate/Database/Connection.php:426
Illuminate\Database\Connection->select(string, array, boolean, array)
vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3573
Illuminate\Database\Query\Builder->runSelect()
vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3557
Illuminate\Database\Query\Builder->get(array)
vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:908
Illuminate\Database\Eloquent\Builder->getModels(array)
vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:890
Illuminate\Database\Eloquent\Builder->get(array)
vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:366
Illuminate\Database\Eloquent\Builder->first()
app/Models/PlatformSetting.php:13
8{9    protected $fillable = ['key', 'value'];1011    public static function get($key, $default = null)12    {13        $row = static::where('key', $key)->first();14        return $row ? $row->value : $default;15    }1617    public static function set($key, $value)18    {19        static::updateOrCreate(['key' => $key], ['value' => $value]);20    }21} 
App\Models\PlatformSetting::get(string, string)
resources/views/auth/login.blade.php:1
1@php2    $appName = \App\Models\PlatformSetting::get('app_name', 'Skoolio');3    $tagline = \App\Models\PlatformSetting::get('tagline');4    $color   = \App\Models\PlatformSetting::get('primary_color', '#059669');5    $logo    = \App\Models\PlatformSetting::get('logo_path');6@endphp7<!DOCTYPE html>8<html lang="en">9<head>10    <meta charset="UTF-8">11    <meta name="viewport" content="width=device-width, initial-scale=1.0">12    <title>Login — {{ $appName }}</title>13    <script src="https://cdn.tailwindcss.com"></script>14    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">15    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">16    <style>17        :root { --brand: {{ $color }}; }18
57 vendor frames
require(string)
vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:123
Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:124
Illuminate\Filesystem\Filesystem->getRequire(string, array)
vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:57
Illuminate\View\Engines\PhpEngine->evaluatePath(string, array)
vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:76
Illuminate\View\Engines\CompilerEngine->get(string, array)
vendor/laravel/framework/src/Illuminate/View/View.php:208
Illuminate\View\View->getContents()
vendor/laravel/framework/src/Illuminate/View/View.php:191
Illuminate\View\View->renderContents()
vendor/laravel/framework/src/Illuminate/View/View.php:160
Illuminate\View\View->render()
vendor/laravel/framework/src/Illuminate/Http/Response.php:82
Illuminate\Http\Response->setContent(object(Illuminate\View\View))
vendor/laravel/framework/src/Illuminate/Http/Response.php:40
Illuminate\Http\Response->__construct(object(Illuminate\View\View), integer, array)
vendor/laravel/framework/src/Illuminate/Routing/Router.php:939
Illuminate\Routing\Router::toResponse(object(Illuminate\Http\Request), object(Illuminate\View\View))
vendor/laravel/framework/src/Illuminate/Routing/Router.php:906
Illuminate\Routing\Router->prepareResponse(object(Illuminate\Http\Request), object(Illuminate\View\View))
vendor/laravel/framework/src/Illuminate/Routing/Router.php:821
Illuminate\Routing\Router->Illuminate\Routing\{closure}(object(Illuminate\Http\Request))
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180
Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Illuminate\Http\Request))
vendor/laravel/framework/src/Illuminate/Auth/Middleware/RedirectIfAuthenticated.php:47
Illuminate\Auth\Middleware\RedirectIfAuthenticated->handle(object(Illuminate\Http\Request), object(Closure))
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Illuminate\Http\Request))
vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:52
Illuminate\Routing\Middleware\SubstituteBindings->handle(object(Illuminate\Http\Request), object(Closure))
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219
Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Illuminate\Http\Request))
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestForgery.php:104
Illuminate\Foundation\Http\Middleware\PreventRequestForgery->handle(object(Illuminate\Http\Request), object(Closure))
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:219