Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Notice: fwrite(): Write of 472 bytes failed with errno=28 No space left on device

Exception

ErrorException

  1.      *
  2.      * @phpstan-param FormattedRecord $record
  3.      */
  4.     protected function streamWrite($stream, array $record): void
  5.     {
  6.         fwrite($stream, (string) $record['formatted']);
  7.     }
  8.     private function customErrorHandler(int $codestring $msg): bool
  9.     {
  10.         $this->errorMessage preg_replace('{^(fopen|mkdir)\(.*?\): }'''$msg);
  1.         if ($this->useLocking) {
  2.             // ignoring errors here, there's not much we can do about them
  3.             flock($streamLOCK_EX);
  4.         }
  5.         $this->streamWrite($stream$record);
  6.         if ($this->useLocking) {
  7.             flock($streamLOCK_UN);
  8.         }
  9.     }
  1.             $record $this->processRecord($record);
  2.         }
  3.         $record['formatted'] = $this->getFormatter()->format($record);
  4.         $this->write($record);
  5.         return false === $this->bubble;
  6.     }
  7.     /**
  1.                     }
  2.                 }
  3.                 // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted
  4.                 try {
  5.                     if (true === $handler->handle($record)) {
  6.                         break;
  7.                     }
  8.                 } catch (Throwable $e) {
  9.                     $this->handleException($e$record);
  1.      * @param string|Stringable $message The log message
  2.      * @param mixed[]           $context The log context
  3.      */
  4.     public function critical($message, array $context = []): void
  5.     {
  6.         $this->addRecord(static::CRITICAL, (string) $message$context);
  7.     }
  8.     /**
  9.      * Adds a log record at the ALERT level.
  10.      *
  1.     {
  2.         if (null !== $this->logger) {
  3.             if (null !== $logLevel) {
  4.                 $this->logger->log($logLevel$message, ['exception' => $exception]);
  5.             } elseif (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
  6.                 $this->logger->critical($message, ['exception' => $exception]);
  7.             } else {
  8.                 $this->logger->error($message, ['exception' => $exception]);
  9.             }
  10.         }
  11.     }
  1.             break;
  2.         }
  3.         $e FlattenException::createFromThrowable($throwable);
  4.         $this->logException($throwablesprintf('Uncaught PHP Exception %s: "%s" at %s line %s'$e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()), $logLevel);
  5.     }
  6.     public function onKernelException(ExceptionEvent $event)
  7.     {
  8.         if (null === $this->controller) {
  1.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.         if ($pop $request !== $this->requestStack->getMainRequest()) {
  2.             $this->requestStack->push($request);
  3.         }
  4.         try {
  5.             $response $this->handleThrowable($exception$requestself::MAIN_REQUEST);
  6.         } finally {
  7.             if ($pop) {
  8.                 $this->requestStack->pop();
  9.             }
  10.         }
  1.                         if ($hasRun) {
  2.                             throw $e;
  3.                         }
  4.                         $hasRun true;
  5.                         $kernel->terminateWithException($e$request);
  6.                     };
  7.                 }
  8.             } elseif ($event instanceof ConsoleEvent && $app $event->getCommand()->getApplication()) {
  9.                 $output $event->getOutput();
  10.                 if ($output instanceof ConsoleOutputInterface) {
in /var/www/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 607)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 return $exceptionHandler($exception);
  6.             }
  7.             $handlerException $handlerException ?: $exception;
  8.         } catch (\Throwable $handlerException) {
  9.         }
  10.         if ($exception === $handlerException && null === $this->exceptionHandler) {
ErrorHandler->handleException()

Stack Trace

ErrorException
ErrorException:
Notice: fwrite(): Write of 472 bytes failed with errno=28 No space left on device

  at /var/www/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:178
  at Monolog\Handler\StreamHandler->streamWrite()
     (/var/www/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:162)
  at Monolog\Handler\StreamHandler->write()
     (/var/www/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:48)
  at Monolog\Handler\AbstractProcessingHandler->handle()
     (/var/www/vendor/monolog/monolog/src/Monolog/Logger.php:399)
  at Monolog\Logger->addRecord()
     (/var/www/vendor/monolog/monolog/src/Monolog/Logger.php:663)
  at Monolog\Logger->critical()
     (/var/www/vendor/symfony/http-kernel/EventListener/ErrorListener.php:164)
  at Symfony\Component\HttpKernel\EventListener\ErrorListener->logException()
     (/var/www/vendor/symfony/http-kernel/EventListener/ErrorListener.php:78)
  at Symfony\Component\HttpKernel\EventListener\ErrorListener->logKernelException()
     (/var/www/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/vendor/symfony/http-kernel/HttpKernel.php:223)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/var/www/vendor/symfony/http-kernel/HttpKernel.php:114)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/var/www/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:131)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/var/www/vendor/symfony/error-handler/ErrorHandler.php:607)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()