Symfony\Component\ErrorHandler\Error\OutOfMemoryError {#10927 -error: array:4 [ "type" => 1 "message" => "Allowed memory size of 805306368 bytes exhausted (tried to allocate 1114112 bytes)" "file" => "/www/htdocs/w01d9cb2/dev/shopware/spruegel/vendor/doctrine/dbal/src/Driver/PDO/Statement.php" "line" => 55 ] }
} public function execute(): Result { try { $this->stmt->execute(); } catch (PDOException $exception) { throw Exception::new($exception); } return new Result($this->stmt); } public function execute(): Result { try { $this->stmt->execute(); } catch (PDOException $exception) { throw Exception::new($exception); } return new Result($this->stmt); $this->wrappedStatement->bindValue($param, $value, $type); } public function execute(): Result { return $this->wrappedStatement->execute(); }} public function execute(): Result { $this->counter->increment(); return parent::execute(); }} $stmt = $connection->prepare($sql); $this->bindParameters($stmt, $params, $types); $result = $stmt->execute(); } else { $result = $connection->query($sql); } return new Result($result, $this); * * @throws Exception */ public function executeQuery(): Result { return $this->connection->executeQuery( $this->getSQL(), $this->params, $this->types, $this->resultCacheProfile, ); if ($criteria->getTitle()) { $query->setTitle($criteria->getTitle() . '::read'); } return $query->executeQuery()->fetchAllAssociative(); } /** * @param EntityCollection<Entity> $collection * @param array<string, mixed> $fieldsForPartialLoading if ($definition->isInheritanceAware() && $criteria->hasAssociation('parent')) { throw DataAbstractionLayerException::parentAssociationCannotBeFetched(); } $rows = $this->fetch($criteria, $definition, $context, $fields, $fieldsForPartialLoading); $collection = $this->hydrator->hydrate( $collection, $definition->getEntityClass(), $definition, if ($criteria->getExcludedFields() !== []) { $this->assertExcludableFields($definition, $criteria->getExcludedFields()); } return $this->_read( $criteria, $definition, $context, new $collectionClass(), $definition->getFields()->getBasicFields(), { $criteria = clone $criteria; /** @var TEntityCollection $entities */ // @phpstan-ignore varTag.type (phpstan can't detect that TEntityCollection is always an EntityCollection<Entity>) $entities = $this->reader->read($this->definition, $criteria, $salesChannelContext->getContext()); if ($criteria->getFields() === []) { $events = $this->eventFactory->createForSalesChannel($entities->getElements(), $salesChannelContext); } else { $events = $this->eventFactory->createPartialForSalesChannel($entities->getElements(), $salesChannelContext); return new EntitySearchResult($this->definition->getEntityName(), $ids->getTotal(), new $collection(), $aggregations, $criteria, $salesChannelContext->getContext()); } $readCriteria = $criteria->cloneForRead($ids->getIds()); $entities = $this->read($readCriteria, $salesChannelContext); $search = $ids->getData(); if (!$criteria->hasState(Criteria::STATE_DISABLE_SEARCH_INFO)) { foreach ($entities as $element) { * * @return EntitySearchResult<TEntityCollection> */ public function search(Criteria $criteria, SalesChannelContext $salesChannelContext): EntitySearchResult { $searchFn = fn (): EntitySearchResult => $this->profile($criteria, fn (): EntitySearchResult => $this->_search($criteria, $salesChannelContext)); return $this->dalSearchInstrumentor?->measure( DalSearchInstrumentor::OPERATION_SEARCH, $this->definition, $criteria, try { foreach (self::$profilers as $profiler) { $profiler->start($name, $category, $tags); } $result = $closure(); } finally { foreach (self::$profilers as $profiler) { $profiler->stop($name); } } */ private function profile(Criteria $criteria, \Closure $fn): mixed { $title = $criteria->getTitle(); return $title === null ? $fn() : Profiler::trace($title, $fn, 'saleschannel-repository'); } /** * @return TEntityCollection */ * * @return EntitySearchResult<TEntityCollection> */ public function search(Criteria $criteria, SalesChannelContext $salesChannelContext): EntitySearchResult { $searchFn = fn (): EntitySearchResult => $this->profile($criteria, fn (): EntitySearchResult => $this->_search($criteria, $salesChannelContext)); return $this->dalSearchInstrumentor?->measure( DalSearchInstrumentor::OPERATION_SEARCH, $this->definition, $criteria, * @return TReturn */ public function measure(string $operation, EntityDefinition $definition, Criteria $criteria, \Closure $callback): mixed { if (!$this->enabled) { return $callback(); } $timer = ElapsedTimer::start(); try { $result = $callback(); */ public function search(Criteria $criteria, SalesChannelContext $salesChannelContext): EntitySearchResult { $searchFn = fn (): EntitySearchResult => $this->profile($criteria, fn (): EntitySearchResult => $this->_search($criteria, $salesChannelContext)); return $this->dalSearchInstrumentor?->measure( DalSearchInstrumentor::OPERATION_SEARCH, $this->definition, $criteria, $searchFn, ) ?? $searchFn(); ->addSorting(new FieldSorting('productNumber')) ->setLimit(self::VARIANT_LIMIT); $criteria->setTitle('cookie-theme::product-variant-matrix'); return $this->productRepository->search($criteria, $context)->getEntities(); } /** * @return list<array{quantity: int, net: float, gross: float}> */ if ($matrixGroup === null) { return; } $context = $event->getSalesChannelContext(); $variants = $this->loadVariants($parentId, $context); if ($variants->count() === 0) { return; } $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); } finally { if ($e->isStarted()) { $e->stop(); } } foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); } } /** * Sorts the internal list of listeners for the given event by priority. } else { $listeners = $this->getListeners($eventName); } if ($listeners) { $this->callListeners($listeners, $eventName, $event); } return $event; } * * @return TEvent */ public function dispatch(object $event, ?string $eventName = null): object { $event = $this->dispatcher->dispatch($event, $eventName); if (!$event instanceof FlowEventAware) { return $event; } ) { } public function dispatch(object $event, ?string $eventName = null): object { $event = $this->dispatcher->dispatch($event, $eventName); if (!HookableEventFactory::isHookable($event)) { return $event; } } $this->dispatch($nested, $name); } } return $this->dispatcher->dispatch($event, $eventName); } /** * @param callable $listener can not use native type declaration @see https://github.com/symfony/symfony/issues/42283 */ try { $this->beforeDispatch($eventName, $event); try { $e = $this->stopwatch->start($eventName, 'section'); try { $this->dispatcher->dispatch($event, $eventName); } finally { if ($e->isStarted()) { $e->stop(); } } if (Feature::isActive('JSON_LD_DATA')) { $this->loadStructuredDataReviews($page, $context); } $this->eventDispatcher->dispatch( new ProductPageLoadedEvent($page, $context, $request) ); return $page; } defaults: [PlatformRequest::ATTRIBUTE_HTTP_CACHE => true], methods: [Request::METHOD_GET] )] public function index(SalesChannelContext $context, Request $request): Response { $page = $this->productPageLoader->load($request, $context); $this->hook(new ProductPageLoadedHook($page, $context)); return $this->renderStorefront( '@Storefront/storefront/page/content/product-detail.html.twig', $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); $controller = $event->getController(); $arguments = $event->getArguments(); // call controller $response = $controller(...$arguments); // view if (!$response instanceof Response) { $event = new ViewEvent($this, $request, $type, $response, $event); $this->dispatcher->dispatch($event, KernelEvents::VIEW); $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); $this->requestStack->push($request); $response = null; try { return $response = $this->handleRaw($request, $type); } catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } $this->dispatcher->dispatch($event); return $event->getResponse(); } return parent::handle($request, $type, $catch); }} if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) { Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet()); } try { return $kernel->handle($request, $type, $catch); } finally { // restore global state Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); } } protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response { $this->surrogate?->addSurrogateCapability($request); // always a "master" request (as the real master request can be in cache) $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch); $this->forwardedRequest = $request; // These headers drive how the body is restored before sending the response. // Only the store and the surrogate may set them, never the backend. $response->headers->remove('X-Body-File'); // avoid that the backend sends no content $subRequest->headers->remove('If-Modified-Since'); $subRequest->headers->remove('If-None-Match'); $response = $this->forward($subRequest, $catch); if ($response->isCacheable()) { $this->store($request, $response); } } if (null === $entry) { $this->record($request, 'miss'); return $this->fetch($request, $catch); } if (!$this->isFreshEnough($request, $entry)) { $this->record($request, 'stale'); $response = $this->fetch($request, $catch); } else { $response = null; do { try { $response = $this->lookup($request, $catch); } catch (CacheWasLockedException) { } } while (null === $response); } // only handle main request inside http cache, because ESI tags are also interpreted as main request. // sub requests are requests, which are forwarded to the kernel inside the php stack // https://github.com/symfony/symfony/issues/51648#issuecomment-1717846894 if ($type === HttpKernelInterface::MAIN_REQUEST) { $response = parent::handle($request, $type, $catch); } elseif ($request->attributes->has('_sw_esi')) { $response = parent::handle($request, $type, $catch); } else { $response = $this->getKernel()->handle($request, $type, $catch); } public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { $this->boot(); return $this->getHttpKernel()->handle($request, $type, $catch); } public function boot(): void { if (!$this->booted) { ) { } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) { fastcgi_finish_request();$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());use Shopware\Core\Installer\InstallerKernel;use Shopware\Core\Framework\Adapter\Kernel\KernelFactory;$_SERVER['SCRIPT_FILENAME'] = __FILE__;require_once __DIR__ . '/../vendor/autoload_runtime.php';if (!file_exists(__DIR__ . '/../.env') && !file_exists(__DIR__ . '/../.env.dist') && !file_exists(__DIR__ . '/../.env.local.php')) { $_SERVER['APP_RUNTIME_OPTIONS']['disable_dotenv'] = true;}|
OutOfMemoryError
|
|---|
Symfony\Component\ErrorHandler\Error\OutOfMemoryError:
Error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 1114112 bytes)
at vendor/doctrine/dbal/src/Driver/PDO/Statement.php:55
at PDOStatement->execute()
(vendor/doctrine/dbal/src/Driver/PDO/Statement.php:55)
at Doctrine\DBAL\Driver\PDO\Statement->execute()
(vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:24)
at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute()
(vendor/shopware/core/Framework/Telemetry/Doctrine/QueryCountStatement.php:33)
at Shopware\Core\Framework\Telemetry\Doctrine\QueryCountStatement->execute()
(vendor/doctrine/dbal/src/Connection.php:800)
at Doctrine\DBAL\Connection->executeQuery()
(vendor/doctrine/dbal/src/Query/QueryBuilder.php:323)
at Doctrine\DBAL\Query\QueryBuilder->executeQuery()
(vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityReader.php:429)
at Shopware\Core\Framework\DataAbstractionLayer\Dbal\EntityReader->fetch()
(vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityReader.php:180)
at Shopware\Core\Framework\DataAbstractionLayer\Dbal\EntityReader->_read()
(vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityReader.php:94)
at Shopware\Core\Framework\DataAbstractionLayer\Dbal\EntityReader->read()
(vendor/shopware/core/System/SalesChannel/Entity/SalesChannelRepository.php:222)
at Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository->read()
(vendor/shopware/core/System/SalesChannel/Entity/SalesChannelRepository.php:140)
at Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository->_search()
(vendor/shopware/core/System/SalesChannel/Entity/SalesChannelRepository.php:72)
at Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository->{closure:{closure:Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository::search():72}:72}()
(vendor/shopware/core/Profiling/Profiler.php:67)
at Shopware\Core\Profiling\Profiler::trace()
(vendor/shopware/core/System/SalesChannel/Entity/SalesChannelRepository.php:210)
at Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository->profile()
(vendor/shopware/core/System/SalesChannel/Entity/SalesChannelRepository.php:72)
at Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository->{closure:Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository::search():72}()
(vendor/shopware/core/Framework/DataAbstractionLayer/Telemetry/DalSearchInstrumentor.php:76)
at Shopware\Core\Framework\DataAbstractionLayer\Telemetry\DalSearchInstrumentor->measure()
(vendor/shopware/core/System/SalesChannel/Entity/SalesChannelRepository.php:74)
at Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository->search()
(custom/plugins/CookieTheme/src/Subscriber/ProductVariantMatrixSubscriber.php:171)
at CookieTheme\Subscriber\ProductVariantMatrixSubscriber->loadVariants()
(custom/plugins/CookieTheme/src/Subscriber/ProductVariantMatrixSubscriber.php:67)
at CookieTheme\Subscriber\ProductVariantMatrixSubscriber->onProductPageLoaded()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/EventDispatcher.php:206)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
(vendor/symfony/event-dispatcher/EventDispatcher.php:56)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
(vendor/shopware/core/Content/Flow/Dispatching/FlowDispatcher.php:43)
at Shopware\Core\Content\Flow\Dispatching\FlowDispatcher->dispatch()
(vendor/shopware/core/Framework/Webhook/WebhookDispatcher.php:28)
at Shopware\Core\Framework\Webhook\WebhookDispatcher->dispatch()
(vendor/shopware/core/Framework/Event/NestedEventDispatcher.php:31)
at Shopware\Core\Framework\Event\NestedEventDispatcher->dispatch()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:129)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(vendor/shopware/storefront/Page/Product/ProductPageLoader.php:127)
at Shopware\Storefront\Page\Product\ProductPageLoader->load()
(vendor/shopware/storefront/Controller/ProductController.php:64)
at Shopware\Storefront\Controller\ProductController->index()
(vendor/symfony/http-kernel/HttpKernel.php:185)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/shopware/core/Framework/Adapter/Kernel/HttpKernel.php:72)
at Shopware\Core\Framework\Adapter\Kernel\HttpKernel->handle()
(vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:476)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:453)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:351)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:220)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
(vendor/shopware/core/Framework/Adapter/Kernel/HttpCacheKernel.php:66)
at Shopware\Core\Framework\Adapter\Kernel\HttpCacheKernel->handle()
(vendor/shopware/core/Kernel.php:136)
at Shopware\Core\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once()
(public/index.php:11)
|