Exceptions
Exception
Elastica\Exception\Connection\ HttpException
in
vendor/ruflin/elastica/src/Transport/Http.php
(line 186)
if ($response->hasFailedShards()) {throw new PartialShardFailureException($request, $response);}if ($errorNumber > 0) {throw new HttpException($errorNumber, $request, $response);}return $response;}
in
vendor/ruflin/elastica/src/Request.php
->
exec
(line 183)
public function send(): Response{$transport = $this->getConnection()->getTransportObject();// Refactor: Not full toArray needed in exec?return $transport->exec($this, $this->getConnection()->toArray());}/*** @return array*/
in
vendor/ruflin/elastica/src/Client.php
->
send
(line 545)
$connection = $this->getConnection();$request = $this->_lastRequest = new Request($path, $method, $data, $query, $connection, $contentType);$this->_lastResponse = null;try {$response = $this->_lastResponse = $request->send();} catch (ConnectionException $e) {$this->_connectionPool->onFail($connection, $e, $this);$this->_logger->error('Elastica Request Failure', ['exception' => $e,'request' => $e->getRequest()->toArray(),
in
vendor/friendsofsymfony/elastica-bundle/src/Elastica/Client.php
->
request
(line 63)
{if ($this->stopwatch) {$this->stopwatch->start('es_request', 'fos_elastica');}$response = parent::request($path, $method, $data, $query, $contentType);$responseData = $response->getData();$transportInfo = $response->getTransferInfo();$connection = $this->getLastRequest()->getConnection();$forbiddenHttpCodes = $connection->hasConfig('http_error_codes') ? $connection->getConfig('http_error_codes') : [];
in
vendor/ruflin/elastica/src/Bulk.php
->
request
(line 306)
* @throws BulkResponseException* @throws InvalidException*/public function send(): ResponseSet{$response = $this->_client->request($this->getPath(), Request::POST, (string) $this, $this->_requestParams, Request::NDJSON_CONTENT_TYPE);return $this->_processResponse($response);}/**
in
vendor/ruflin/elastica/src/Client.php
->
send
(line 230)
$bulk->addDocuments($docs, Action::OP_TYPE_UPDATE);foreach ($requestParams as $key => $value) {$bulk->setRequestParam($key, $value);}return $bulk->send();}/*** Uses _bulk to send documents to the server.*
in
vendor/ruflin/elastica/src/Index.php
->
updateDocuments
(line 175)
{foreach ($docs as $doc) {$doc->setIndex($this->getName());}return $this->getClient()->updateDocuments($docs, $options);}/*** Update entries in the db based on a query.*
in
vendor/friendsofsymfony/elastica-bundle/src/Persister/ObjectPersister.php
->
updateDocuments
(line 151)
$document->setDocAsUpsert(true);$documents[] = $document;}try {$this->index->updateDocuments($documents, $this->options);} catch (BulkException $e) {$this->log($e);}}
in
vendor/friendsofsymfony/elastica-bundle/src/Doctrine/Listener.php
->
replaceMany
(line 180)
if (\count($this->scheduledForInsertion)) {$this->objectPersister->insertMany($this->scheduledForInsertion);$this->scheduledForInsertion = [];}if (\count($this->scheduledForUpdate)) {$this->objectPersister->replaceMany($this->scheduledForUpdate);$this->scheduledForUpdate = [];}if (\count($this->scheduledForDeletion)) {$this->objectPersister->deleteManyByIdentifiers($this->scheduledForDeletion);$this->scheduledForDeletion = [];
in
vendor/friendsofsymfony/elastica-bundle/src/Doctrine/Listener.php
->
persistScheduled
(line 155)
* Iterating through scheduled actions *after* flushing ensures that the* ElasticSearch index will be affected only if the query is successful.*/public function postFlush(){$this->persistScheduled();}/*** Determines whether or not it is okay to persist now.*
in
vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php
->
postFlush
(line 66)
if (!isset($this->initialized[$eventName])) {$this->initializeListeners($eventName);}foreach ($this->listeners[$eventName] as $hash => $listener) {$listener->{$this->methods[$eventName][$hash]}($eventArgs);}}/*** {@inheritdoc}
in
vendor/doctrine/orm/src/UnitOfWork.php
->
dispatchEvent
(line 3815)
}private function dispatchPostFlushEvent(): void{if ($this->evm->hasListeners(Events::postFlush)) {$this->evm->dispatchEvent(Events::postFlush, new PostFlushEventArgs($this->em));}}/*** Verifies if two given entities actually are the same based on identifier comparison
in
vendor/doctrine/orm/src/UnitOfWork.php
->
dispatchPostFlushEvent
(line 509)
}$coll->takeSnapshot();}$this->dispatchPostFlushEvent();$this->postCommitCleanup($entity);}/** @param object|object[]|null $entity */
in
vendor/doctrine/orm/src/EntityManager.php
->
commit
(line 414)
);}$this->errorIfClosed();$this->unitOfWork->commit($entity);}/*** Finds an Entity by its identifier.*
in
var/cache/dev/ContainerM1Rturz/EntityManager_9a5be93.php
->
flush
(line 136)
public function flush($entity = null){$this->initializeree540 && ($this->initializeree540->__invoke($valueHolder651c6, $this, 'flush', array('entity' => $entity), $this->initializeree540) || 1) && $this->valueHolder651c6 = $valueHolder651c6;return $this->valueHolder651c6->flush($entity);}public function find($className, $id, $lockMode = null, $lockVersion = null){$this->initializeree540 && ($this->initializeree540->__invoke($valueHolder651c6, $this, 'find', array('className' => $className, 'id' => $id, 'lockMode' => $lockMode, 'lockVersion' => $lockVersion), $this->initializeree540) || 1) && $this->valueHolder651c6 = $valueHolder651c6;
public function add(ProdViews $entity, bool $flush = false): void{$this->getEntityManager()->persist($entity);if ($flush) {$this->getEntityManager()->flush();}}public function remove(ProdViews $entity, bool $flush = false): void{
public function addProd(int $prod_id){$prodView = new ProdViews();$prodView->setProd($prod_id);$prodView->setTstamp(time());$this->prodViewsRepository->add($prodView, true);}}
if ($prod) {$prod->setPrices($this->ModelProd->getPrices($prod));}//Статистика показов$this->prodView->addProd($prod->getId());//TODO. Import Photos. Photos из базы$photos = $this->Photos->findBy(['type' => 'prod', 'par' => $prod->getId()]);$cat_id = $prod->getCat();
in
vendor/symfony/http-kernel/HttpKernel.php
->
prodCont
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);try {return $this->handleRaw($request, $type);} catch (\Exception $e) {if ($e instanceof RequestExceptionInterface) {$e = new BadRequestHttpException($e->getMessage(), $e);}if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php
->
handle
(line 86)
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 stateRequest::setTrustedProxies($trustedProxies, $trustedHeaderSet);}}
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
::
handle
(line 457)
if ($this->surrogate) {$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);/** Support stale-if-error given on Responses or as a config option.* RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual* Cache-Control directives) that
in
vendor/symfony/framework-bundle/HttpCache/HttpCache.php
->
forward
(line 71)
protected function forward(Request $request, bool $catch = false, Response $entry = null): Response{$this->getKernel()->boot();$this->getKernel()->getContainer()->set('cache', $this);return parent::forward($request, $catch, $entry);}/*** Returns an array of options to customize the Cache configuration.*/
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
forward
(line 430)
// 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);}
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
fetch
(line 328)
}if (null === $entry) {$this->record($request, 'miss');return $this->fetch($request, $catch);}if (!$this->isFreshEnough($request, $entry)) {$this->record($request, 'stale');
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
lookup
(line 212)
reload the cache by fetching a fresh response and caching it (if possible).*/$this->record($request, 'reload');$response = $this->fetch($request, $catch);} else {$response = $this->lookup($request, $catch);}$this->restoreResponseBody($request, $response);if (HttpKernelInterface::MAIN_REQUEST === $type) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
{if (!$this->booted) {$container = $this->container ?? $this->preBoot();if ($container->has('http_cache')) {return $container->get('http_cache')->handle($request, $type, $catch);}}$this->boot();++$this->requestStackSize;
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$this->request = $request;}public function run(): int{$response = $this->kernel->handle($this->request);$response->send();if ($this->kernel instanceof TerminableInterface) {$this->kernel->terminate($this->request, $response);}
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/home/mirbusin.ru/public_html/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Stack Trace
|
HttpException
|
|---|
Elastica\Exception\Connection\HttpException:
Couldn't connect to host, Elasticsearch down?
at vendor/ruflin/elastica/src/Transport/Http.php:186
at Elastica\Transport\Http->exec()
(vendor/ruflin/elastica/src/Request.php:183)
at Elastica\Request->send()
(vendor/ruflin/elastica/src/Client.php:545)
at Elastica\Client->request()
(vendor/friendsofsymfony/elastica-bundle/src/Elastica/Client.php:63)
at FOS\ElasticaBundle\Elastica\Client->request()
(vendor/ruflin/elastica/src/Bulk.php:306)
at Elastica\Bulk->send()
(vendor/ruflin/elastica/src/Client.php:230)
at Elastica\Client->updateDocuments()
(vendor/ruflin/elastica/src/Index.php:175)
at Elastica\Index->updateDocuments()
(vendor/friendsofsymfony/elastica-bundle/src/Persister/ObjectPersister.php:151)
at FOS\ElasticaBundle\Persister\ObjectPersister->replaceMany()
(vendor/friendsofsymfony/elastica-bundle/src/Doctrine/Listener.php:180)
at FOS\ElasticaBundle\Doctrine\Listener->persistScheduled()
(vendor/friendsofsymfony/elastica-bundle/src/Doctrine/Listener.php:155)
at FOS\ElasticaBundle\Doctrine\Listener->postFlush()
(vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:66)
at Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent()
(vendor/doctrine/orm/src/UnitOfWork.php:3815)
at Doctrine\ORM\UnitOfWork->dispatchPostFlushEvent()
(vendor/doctrine/orm/src/UnitOfWork.php:509)
at Doctrine\ORM\UnitOfWork->commit()
(vendor/doctrine/orm/src/EntityManager.php:414)
at Doctrine\ORM\EntityManager->flush()
(var/cache/dev/ContainerM1Rturz/EntityManager_9a5be93.php:136)
at ContainerM1Rturz\EntityManager_9a5be93->flush()
(src/Repository/ProdViewsRepository.php:29)
at App\Repository\ProdViewsRepository->add()
(src/Service/Statistics/ProdView.php:20)
at App\Service\Statistics\ProdView->addProd()
(src/Controller/CatalogController.php:476)
at App\Controller\CatalogController->prodCont()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:75)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:457)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
(vendor/symfony/framework-bundle/HttpCache/HttpCache.php:71)
at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:430)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:328)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
(vendor/symfony/http-kernel/HttpCache/HttpCache.php:212)
at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
(vendor/symfony/http-kernel/Kernel.php:193)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/home/mirbusin.ru/public_html/vendor/autoload_runtime.php')
(public/index.php:5)
|