Symfony Exception

PDOException QueryException

HTTP 500 Internal Server Error

SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from `app_settings` limit 1)

Exceptions 2

Illuminate\Database\ QueryException

Show exception properties
Illuminate\Database\QueryException {#406
  +errorInfo: array:3 [
    0 => "HY000"
    1 => 2002
    2 => "No such file or directory"
  ]
  +connectionName: "mysql"
  #sql: "select * from `app_settings` limit 1"
  #bindings: []
}
  1.                 throw new UniqueConstraintViolationException(
  2.                     $this->getName(), $query$this->prepareBindings($bindings), $e
  3.                 );
  4.             }
  5.             throw new QueryException(
  6.                 $this->getName(), $query$this->prepareBindings($bindings), $e
  7.             );
  8.         }
  9.     }
  1.     protected function tryAgainIfCausedByLostConnection(QueryException $e$query$bindingsClosure $callback)
  2.     {
  3.         if ($this->causedByLostConnection($e->getPrevious())) {
  4.             $this->reconnect();
  5.             return $this->runQueryCallback($query$bindings$callback);
  6.         }
  7.         throw $e;
  8.     }
  1.     {
  2.         if ($this->transactions >= 1) {
  3.             throw $e;
  4.         }
  5.         return $this->tryAgainIfCausedByLostConnection(
  6.             $e$query$bindings$callback
  7.         );
  8.     }
  9.     /**
  1.         // caused by a connection that has been lost. If that is the cause, we'll try
  2.         // to re-establish connection and re-run the query with a fresh connection.
  3.         try {
  4.             $result $this->runQueryCallback($query$bindings$callback);
  5.         } catch (QueryException $e) {
  6.             $result $this->handleQueryException(
  7.                 $e$query$bindings$callback
  8.             );
  9.         }
  10.         // Once we have run the query we will calculate the time that it took to run and
  1.      * @param  bool  $useReadPdo
  2.      * @return array
  3.      */
  4.     public function select($query$bindings = [], $useReadPdo true)
  5.     {
  6.         return $this->run($query$bindings, function ($query$bindings) use ($useReadPdo) {
  7.             if ($this->pretending()) {
  8.                 return [];
  9.             }
  10.             // For select statements, we'll simply execute the query and return an array
  1.      *
  2.      * @return array
  3.      */
  4.     protected function runSelect()
  5.     {
  6.         return $this->connection->select(
  7.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8.         );
  9.     }
  10.     /**
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7.             return $this->processor->processSelect($this$this->runSelect());
  8.         }));
  9.     }
  10.     /**
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Database\Eloquent\Model|object|static|null
  3.      */
  4.     public function first($columns = ['*'])
  5.     {
  6.         return $this->take(1)->get($columns)->first();
  7.     }
  8.     /**
  9.      * Execute the query and get the first result if it's the sole matching record.
  10.      *
  1.             $minutes app()->isProduction() ? now()->addMinutes(1) : 1;
  2.             $appSetting Cache::remember('appSetting',$minutes, function () {
  3.                 try {
  4.                     return DB::table('app_settings')->first();
  5.                 } catch (\Exception $ex) {
  6.                     throw $ex;
  7.                 }
  8.             });
  9.             View::share('appSetting'$appSetting);
  1.         // given number of seconds so it's available for all subsequent requests.
  2.         if (! is_null($value)) {
  3.             return $value;
  4.         }
  5.         $value $callback();
  6.         $this->put($key$valuevalue($ttl$value));
  7.         return $value;
  8.     }
  1.      * @param  array  $parameters
  2.      * @return mixed
  3.      */
  4.     public function __call($method$parameters)
  5.     {
  6.         return $this->store()->$method(...$parameters);
  7.     }
  8. }
  1.         if (! $instance) {
  2.             throw new RuntimeException('A facade root has not been set.');
  3.         }
  4.         return $instance->$method(...$args);
  5.     }
  6. }
  1.                 return "<?php echo number_format($number, 2, ',', '.'); ?>";
  2.             });
  3.             $minutes app()->isProduction() ? now()->addMinutes(1) : 1;
  4.             $appSetting Cache::remember('appSetting',$minutes, function () {
  5.                 try {
  6.                     return DB::table('app_settings')->first();
  7.                 } catch (\Exception $ex) {
  8.                     throw $ex;
  9.                 }
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack true;
  3.         }
  4.         $result BoundMethod::call($this$callback$parameters$defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.     protected function bootProvider(ServiceProvider $provider)
  2.     {
  3.         $provider->callBootingCallbacks();
  4.         if (method_exists($provider'boot')) {
  5.             $this->call([$provider'boot']);
  6.         }
  7.         $provider->callBootedCallbacks();
  8.     }
  1.         // for any listeners that need to do work after this initial booting gets
  2.         // finished. This is useful when ordering the boot-up processes we run.
  3.         $this->fireAppCallbacks($this->bootingCallbacks);
  4.         array_walk($this->serviceProviders, function ($p) {
  5.             $this->bootProvider($p);
  6.         });
  7.         $this->booted true;
  8.         $this->fireAppCallbacks($this->bootedCallbacks);
Application->Illuminate\Foundation\{closure}()
  1.         // Once the application has booted we will also fire some "booted" callbacks
  2.         // for any listeners that need to do work after this initial booting gets
  3.         // finished. This is useful when ordering the boot-up processes we run.
  4.         $this->fireAppCallbacks($this->bootingCallbacks);
  5.         array_walk($this->serviceProviders, function ($p) {
  6.             $this->bootProvider($p);
  7.         });
  8.         $this->booted true;
  1.      * @param  \Illuminate\Contracts\Foundation\Application  $app
  2.      * @return void
  3.      */
  4.     public function bootstrap(Application $app)
  5.     {
  6.         $app->boot();
  7.     }
  8. }
  1.         $this->hasBeenBootstrapped true;
  2.         foreach ($bootstrappers as $bootstrapper) {
  3.             $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
  4.             $this->make($bootstrapper)->bootstrap($this);
  5.             $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
  6.         }
  7.     }
  1.      * @return void
  2.      */
  3.     public function bootstrap()
  4.     {
  5.         if (! $this->app->hasBeenBootstrapped()) {
  6.             $this->app->bootstrapWith($this->bootstrappers());
  7.         }
  8.     }
  9.     /**
  10.      * Get the route dispatcher callback.
  1.     {
  2.         $this->app->instance('request'$request);
  3.         Facade::clearResolvedInstance('request');
  4.         $this->bootstrap();
  5.         return (new Pipeline($this->app))
  6.                     ->send($request)
  7.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  8.                     ->then($this->dispatchToRouter());
  1.         $this->requestStartedAt Carbon::now();
  2.         try {
  3.             $request->enableHttpMethodParameterOverride();
  4.             $response $this->sendRequestThroughRouter($request);
  5.         } catch (Throwable $e) {
  6.             $this->reportException($e);
  7.             $response $this->renderException($request$e);
  8.         }
Kernel->handle() in /var/www/webapp/idcasn/public/index.php (line 51)
  1. $app = require_once __DIR__.'/../bootstrap/app.php';
  2. $kernel $app->make(Kernel::class);
  3. $response $kernel->handle(
  4.     $request Request::capture()
  5. )->send();
  6. $kernel->terminate($request$response);

PDOException

SQLSTATE[HY000] [2002] No such file or directory

  1.      * @param  array  $options
  2.      * @return \PDO
  3.      */
  4.     protected function createPdoConnection($dsn$username$password$options)
  5.     {
  6.         return new PDO($dsn$username$password$options);
  7.     }
  8.     /**
  9.      * Handle an exception that occurred during connect execution.
  10.      *
  1.      * @param  array  $options
  2.      * @return \PDO
  3.      */
  4.     protected function createPdoConnection($dsn$username$password$options)
  5.     {
  6.         return new PDO($dsn$username$password$options);
  7.     }
  8.     /**
  9.      * Handle an exception that occurred during connect execution.
  10.      *
  1.      * @throws \Exception
  2.      */
  3.     protected function tryAgainIfCausedByLostConnection(Throwable $e$dsn$username$password$options)
  4.     {
  5.         if ($this->causedByLostConnection($e)) {
  6.             return $this->createPdoConnection($dsn$username$password$options);
  7.         }
  8.         throw $e;
  9.     }
  1.         try {
  2.             return $this->createPdoConnection(
  3.                 $dsn$username$password$options
  4.             );
  5.         } catch (Exception $e) {
  6.             return $this->tryAgainIfCausedByLostConnection(
  7.                 $e$dsn$username$password$options
  8.             );
  9.         }
  10.     }
  1.         $options $this->getOptions($config);
  2.         // We need to grab the PDO options that should be used while making the brand
  3.         // new connection instance. The PDO options control various aspects of the
  4.         // connection's behavior, and some might be specified by the developers.
  5.         $connection $this->createConnection($dsn$config$options);
  6.         if (! empty($config['database'])) {
  7.             $connection->exec("use `{$config['database']}`;");
  8.         }
  1.         return function () use ($config) {
  2.             foreach (Arr::shuffle($this->parseHosts($config)) as $host) {
  3.                 $config['host'] = $host;
  4.                 try {
  5.                     return $this->createConnector($config)->connect($config);
  6.                 } catch (PDOException $e) {
  7.                     continue;
  8.                 }
  9.             }
ConnectionFactory->Illuminate\Database\Connectors\{closure}()
  1.      * @return \PDO
  2.      */
  3.     public function getPdo()
  4.     {
  5.         if ($this->pdo instanceof Closure) {
  6.             return $this->pdo call_user_func($this->pdo);
  7.         }
  8.         return $this->pdo;
  9.     }
  1.         if ($this->readPdo instanceof Closure) {
  2.             return $this->readPdo call_user_func($this->readPdo);
  3.         }
  4.         return $this->readPdo ?: $this->getPdo();
  5.     }
  6.     /**
  7.      * Get the current read PDO connection parameter without executing any reconnect logic.
  8.      *
  1.      * @param  bool  $useReadPdo
  2.      * @return \PDO
  3.      */
  4.     protected function getPdoForSelect($useReadPdo true)
  5.     {
  6.         return $useReadPdo $this->getReadPdo() : $this->getPdo();
  7.     }
  8.     /**
  9.      * Run an insert statement against the database.
  10.      *
  1.             // For select statements, we'll simply execute the query and return an array
  2.             // of the database result set. Each element in the array will be a single
  3.             // row from the database table, and will either be an array or objects.
  4.             $statement $this->prepared(
  5.                 $this->getPdoForSelect($useReadPdo)->prepare($query)
  6.             );
  7.             $this->bindValues($statement$this->prepareBindings($bindings));
  8.             $statement->execute();
  1.     {
  2.         // To execute the statement, we'll simply call the callback, which will actually
  3.         // run the SQL against the PDO connection. Then we can calculate the time it
  4.         // took to execute and log the query SQL, bindings and time in our memory.
  5.         try {
  6.             return $callback($query$bindings);
  7.         }
  8.         // If an exception occurs when attempting to run a query, we'll format the error
  9.         // message to include the bindings with SQL, which will make this exception a
  10.         // lot more helpful to the developer instead of just the database's errors.
  1.     protected function tryAgainIfCausedByLostConnection(QueryException $e$query$bindingsClosure $callback)
  2.     {
  3.         if ($this->causedByLostConnection($e->getPrevious())) {
  4.             $this->reconnect();
  5.             return $this->runQueryCallback($query$bindings$callback);
  6.         }
  7.         throw $e;
  8.     }
  1.     {
  2.         if ($this->transactions >= 1) {
  3.             throw $e;
  4.         }
  5.         return $this->tryAgainIfCausedByLostConnection(
  6.             $e$query$bindings$callback
  7.         );
  8.     }
  9.     /**
  1.         // caused by a connection that has been lost. If that is the cause, we'll try
  2.         // to re-establish connection and re-run the query with a fresh connection.
  3.         try {
  4.             $result $this->runQueryCallback($query$bindings$callback);
  5.         } catch (QueryException $e) {
  6.             $result $this->handleQueryException(
  7.                 $e$query$bindings$callback
  8.             );
  9.         }
  10.         // Once we have run the query we will calculate the time that it took to run and
  1.      * @param  bool  $useReadPdo
  2.      * @return array
  3.      */
  4.     public function select($query$bindings = [], $useReadPdo true)
  5.     {
  6.         return $this->run($query$bindings, function ($query$bindings) use ($useReadPdo) {
  7.             if ($this->pretending()) {
  8.                 return [];
  9.             }
  10.             // For select statements, we'll simply execute the query and return an array
  1.      *
  2.      * @return array
  3.      */
  4.     protected function runSelect()
  5.     {
  6.         return $this->connection->select(
  7.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8.         );
  9.     }
  10.     /**
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7.             return $this->processor->processSelect($this$this->runSelect());
  8.         }));
  9.     }
  10.     /**
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Database\Eloquent\Model|object|static|null
  3.      */
  4.     public function first($columns = ['*'])
  5.     {
  6.         return $this->take(1)->get($columns)->first();
  7.     }
  8.     /**
  9.      * Execute the query and get the first result if it's the sole matching record.
  10.      *
  1.             $minutes app()->isProduction() ? now()->addMinutes(1) : 1;
  2.             $appSetting Cache::remember('appSetting',$minutes, function () {
  3.                 try {
  4.                     return DB::table('app_settings')->first();
  5.                 } catch (\Exception $ex) {
  6.                     throw $ex;
  7.                 }
  8.             });
  9.             View::share('appSetting'$appSetting);
  1.         // given number of seconds so it's available for all subsequent requests.
  2.         if (! is_null($value)) {
  3.             return $value;
  4.         }
  5.         $value $callback();
  6.         $this->put($key$valuevalue($ttl$value));
  7.         return $value;
  8.     }
  1.      * @param  array  $parameters
  2.      * @return mixed
  3.      */
  4.     public function __call($method$parameters)
  5.     {
  6.         return $this->store()->$method(...$parameters);
  7.     }
  8. }
  1.         if (! $instance) {
  2.             throw new RuntimeException('A facade root has not been set.');
  3.         }
  4.         return $instance->$method(...$args);
  5.     }
  6. }
  1.                 return "<?php echo number_format($number, 2, ',', '.'); ?>";
  2.             });
  3.             $minutes app()->isProduction() ? now()->addMinutes(1) : 1;
  4.             $appSetting Cache::remember('appSetting',$minutes, function () {
  5.                 try {
  6.                     return DB::table('app_settings')->first();
  7.                 } catch (\Exception $ex) {
  8.                     throw $ex;
  9.                 }
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack true;
  3.         }
  4.         $result BoundMethod::call($this$callback$parameters$defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.     protected function bootProvider(ServiceProvider $provider)
  2.     {
  3.         $provider->callBootingCallbacks();
  4.         if (method_exists($provider'boot')) {
  5.             $this->call([$provider'boot']);
  6.         }
  7.         $provider->callBootedCallbacks();
  8.     }
  1.         // for any listeners that need to do work after this initial booting gets
  2.         // finished. This is useful when ordering the boot-up processes we run.
  3.         $this->fireAppCallbacks($this->bootingCallbacks);
  4.         array_walk($this->serviceProviders, function ($p) {
  5.             $this->bootProvider($p);
  6.         });
  7.         $this->booted true;
  8.         $this->fireAppCallbacks($this->bootedCallbacks);
Application->Illuminate\Foundation\{closure}()
  1.         // Once the application has booted we will also fire some "booted" callbacks
  2.         // for any listeners that need to do work after this initial booting gets
  3.         // finished. This is useful when ordering the boot-up processes we run.
  4.         $this->fireAppCallbacks($this->bootingCallbacks);
  5.         array_walk($this->serviceProviders, function ($p) {
  6.             $this->bootProvider($p);
  7.         });
  8.         $this->booted true;
  1.      * @param  \Illuminate\Contracts\Foundation\Application  $app
  2.      * @return void
  3.      */
  4.     public function bootstrap(Application $app)
  5.     {
  6.         $app->boot();
  7.     }
  8. }
  1.         $this->hasBeenBootstrapped true;
  2.         foreach ($bootstrappers as $bootstrapper) {
  3.             $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
  4.             $this->make($bootstrapper)->bootstrap($this);
  5.             $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
  6.         }
  7.     }
  1.      * @return void
  2.      */
  3.     public function bootstrap()
  4.     {
  5.         if (! $this->app->hasBeenBootstrapped()) {
  6.             $this->app->bootstrapWith($this->bootstrappers());
  7.         }
  8.     }
  9.     /**
  10.      * Get the route dispatcher callback.
  1.     {
  2.         $this->app->instance('request'$request);
  3.         Facade::clearResolvedInstance('request');
  4.         $this->bootstrap();
  5.         return (new Pipeline($this->app))
  6.                     ->send($request)
  7.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  8.                     ->then($this->dispatchToRouter());
  1.         $this->requestStartedAt Carbon::now();
  2.         try {
  3.             $request->enableHttpMethodParameterOverride();
  4.             $response $this->sendRequestThroughRouter($request);
  5.         } catch (Throwable $e) {
  6.             $this->reportException($e);
  7.             $response $this->renderException($request$e);
  8.         }
Kernel->handle() in /var/www/webapp/idcasn/public/index.php (line 51)
  1. $app = require_once __DIR__.'/../bootstrap/app.php';
  2. $kernel $app->make(Kernel::class);
  3. $response $kernel->handle(
  4.     $request Request::capture()
  5. )->send();
  6. $kernel->terminate($request$response);

Stack Traces 2

[2/2] QueryException
Illuminate\Database\QueryException:
SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from `app_settings` limit 1)

  at /var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
  at Illuminate\Database\Connection->runQueryCallback()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:983)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:962)
  at Illuminate\Database\Connection->handleQueryException()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:785)
  at Illuminate\Database\Connection->run()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414)
  at Illuminate\Database\Connection->select()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2751)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2740)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3294)
  at Illuminate\Database\Query\Builder->onceWithColumns()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2739)
  at Illuminate\Database\Query\Builder->get()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:333)
  at Illuminate\Database\Query\Builder->first()
     (/var/www/webapp/idcasn/app/Providers/AppServiceProvider.php:41)
  at App\Providers\AppServiceProvider->App\Providers\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397)
  at Illuminate\Cache\Repository->remember()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429)
  at Illuminate\Cache\CacheManager->__call()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355)
  at Illuminate\Support\Facades\Facade::__callStatic()
     (/var/www/webapp/idcasn/app/Providers/AppServiceProvider.php:39)
  at App\Providers\AppServiceProvider->boot()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/Container.php:662)
  at Illuminate\Container\Container->call()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1030)
  at Illuminate\Foundation\Application->bootProvider()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1011)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
  at array_walk()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1010)
  at Illuminate\Foundation\Application->boot()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:263)
  at Illuminate\Foundation\Application->bootstrapWith()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:186)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:170)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144)
  at Illuminate\Foundation\Http\Kernel->handle()
     (/var/www/webapp/idcasn/public/index.php:51)                
[1/2] PDOException
PDOException:
SQLSTATE[HY000] [2002] No such file or directory

  at /var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65
  at PDO->__construct()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65)
  at Illuminate\Database\Connectors\Connector->createPdoConnection()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:83)
  at Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:48)
  at Illuminate\Database\Connectors\Connector->createConnection()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24)
  at Illuminate\Database\Connectors\MySqlConnector->connect()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184)
  at Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
  at call_user_func()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1339)
  at Illuminate\Database\Connection->getPdo()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1375)
  at Illuminate\Database\Connection->getReadPdo()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:528)
  at Illuminate\Database\Connection->getPdoForSelect()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:423)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:816)
  at Illuminate\Database\Connection->runQueryCallback()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:983)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:962)
  at Illuminate\Database\Connection->handleQueryException()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:785)
  at Illuminate\Database\Connection->run()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414)
  at Illuminate\Database\Connection->select()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2751)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2740)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3294)
  at Illuminate\Database\Query\Builder->onceWithColumns()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2739)
  at Illuminate\Database\Query\Builder->get()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:333)
  at Illuminate\Database\Query\Builder->first()
     (/var/www/webapp/idcasn/app/Providers/AppServiceProvider.php:41)
  at App\Providers\AppServiceProvider->App\Providers\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397)
  at Illuminate\Cache\Repository->remember()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429)
  at Illuminate\Cache\CacheManager->__call()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355)
  at Illuminate\Support\Facades\Facade::__callStatic()
     (/var/www/webapp/idcasn/app/Providers/AppServiceProvider.php:39)
  at App\Providers\AppServiceProvider->boot()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Container/Container.php:662)
  at Illuminate\Container\Container->call()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1030)
  at Illuminate\Foundation\Application->bootProvider()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1011)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
  at array_walk()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1010)
  at Illuminate\Foundation\Application->boot()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:263)
  at Illuminate\Foundation\Application->bootstrapWith()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:186)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:170)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
     (/var/www/webapp/idcasn/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144)
  at Illuminate\Foundation\Http\Kernel->handle()
     (/var/www/webapp/idcasn/public/index.php:51)