^ yii\db\Exception {#241
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php"
#line: 642
-previous: PDOException {#242
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php"
#line: 710
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
trace: {
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:710 {
yii\db\Connection->createPdoInstance() …
›
› return new $pdoClass($dsn, $this->username, $this->password, $this->attributes);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:631 {
yii\db\Connection->open() …
›
› $this->pdo = $this->createPdoInstance();
› $this->initConnection();
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:1030 {
yii\db\Connection->getMasterPdo() …
› {
› $this->open();
› return $this->pdo;
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:1017 {
yii\db\Connection->getSlavePdo($fallbackToMaster = true) …
› if ($db === null) {
› return $fallbackToMaster ? $this->getMasterPdo() : null;
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Command.php:265 {
yii\sphinx\Command->prepare($forRead = null) …
› if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) {
› $pdo = $this->db->getSlavePdo();
› } else {
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Command.php:1154 {
yii\db\Command->queryInternal($method, $fetchMode = null) …
›
› $this->prepare(true);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Command.php:401 {
yii\db\Command->queryAll($fetchMode = null) …
› {
› return $this->queryInternal('fetchAll', $fetchMode);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:256 {
yii\sphinx\Schema->findIndexes() …
›
› return $this->db->createCommand($sql)->queryAll();
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:240 {
yii\sphinx\Schema->initIndexesInfo() …
› $this->_indexTypes = [];
› $indexes = $this->findIndexes();
› foreach ($indexes as $index) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:227 {
yii\sphinx\Schema->getIndexTypes($refresh = false) …
› if (!isset($this->_indexTypes) || $refresh) {
› $this->initIndexesInfo();
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:114 {
yii\sphinx\Schema->resolveIndexType($index) …
› {
› $indexTypes = $this->getIndexTypes();
› $index->type = array_key_exists($index->name, $indexTypes) ? $indexTypes[$index->name] : 'unknown';
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:90 {
yii\sphinx\Schema->loadIndexSchema($name) …
› $this->resolveIndexNames($index, $name);
› $this->resolveIndexType($index);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:152 {
yii\sphinx\Schema->getIndexSchema($name, $refresh = false) …
›
› return $this->_indexes[$name] = $this->loadIndexSchema($realName);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Connection.php:89 {
yii\sphinx\Connection->getIndexSchema($name, $refresh = false) …
› {
› return $this->getSchema()->getIndexSchema($name, $refresh);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/QueryBuilder.php:1294 {
yii\sphinx\QueryBuilder->getIndexSchemas($indexes) …
› foreach ($indexes as $indexName) {
› $index = $this->db->getIndexSchema($indexName);
› if ($index !== null) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/QueryBuilder.php:602 {
yii\sphinx\QueryBuilder->buildWhere($indexes, $condition, &$params, $match = null) …
› }
› $indexSchemas = $this->getIndexSchemas($indexes);
› $where = $this->buildCondition($indexSchemas, $condition, $params);
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/QueryBuilder.php:128 {
yii\sphinx\QueryBuilder->build($query, $params = []) …
› $this->buildFrom($from, $params),
› $this->buildWhere($from, $query->where, $params, $query->match),
› $this->buildGroupBy($query->groupBy, $query->groupLimit),
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Query.php:180 {
yii\sphinx\Query->createCommand($db = null) …
› $db = $this->getConnection();
› list ($sql, $params) = $db->getQueryBuilder()->build($this);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Query.php:248 {
yii\db\Query->all($db = null) …
› }
› $rows = $this->createCommand($db)->queryAll();
› return $this->populate($rows);
}
/var/www/h9/data/www/models/Firm.php:1199 {
app\models\Firm::search($geo, $filter, $pager = null, $returnCount = false) …
› \t->limit(5000)
› \t->all();
› $searchIds = ArrayHelper::getColumn($rows, 'id');
}
/var/www/h9/data/www/models/Firm.php:1285 {
app\models\Firm::count($geo, $filter) …
› public static function count($geo, $filter){
› \treturn Firm::search($geo, $filter, null, true);
› }
}
/var/www/h9/data/www/components/BpkApiService.php:97 {
app\components\BpkApiService->prepareOtherDominants($od) …
› $filter->search = $dominant['name'];\r
› $firmCount = Firm::count($this->geo, $filter);\r
› if($firmCount > 0) {\r
}
/var/www/h9/data/www/components/BpkApiService.php:79 {
app\components\BpkApiService->prepareData($data) …
› $result['main_dominant'] = $data['main_dominant'];\r
› $result['other_dominants'] = $this->prepareOtherDominants($data['other_dominants']);\r
› //$result['main_dominant_core'] = array_slice($data['main_dominant_core'], 0, rand(5, 10));\r
}
/var/www/h9/data/www/components/BpkApiService.php:67 {
app\components\BpkApiService->getKotelCores() …
› \r
› return $this->prepareData($data);\r
› }\r
}
/var/www/h9/data/www/components/BpkApiService.php:43 {
app\components\BpkApiService->getCores() …
› try {\r
› $cores = $this->getKotelCores();\r
› } catch (\Exception $exception) {\r
}
/var/www/h9/data/www/controllers/SiteController.php:1285 {
app\controllers\SiteController->actionFirm($countryUrl, $cityUrl, $groupUrl, $firmUrl) …
› $bpkApiService = new BpkApiService($firm, $geo);
› $cores = $bpkApiService->getCores();
›
}
app\controllers\SiteController->actionFirm() {}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/InlineAction.php:57 {
yii\base\InlineAction->runWithParams($params) …
›
› return call_user_func_array([$this->controller, $this->actionMethod], $args);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/Controller.php:180 {
yii\base\Controller->runAction($id, $params = []) …
› // run the action
› $result = $action->runWithParams($params);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/Module.php:528 {
yii\base\Module->runAction($route, $params = []) …
› Yii::$app->controller = $controller;
› $result = $controller->runAction($actionID, $params);
› if ($oldController !== null) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2/web/Application.php:103 {
yii\web\Application->handleRequest($request) …
› $this->requestedRoute = $route;
› $result = $this->runAction($route, $params);
› if ($result instanceof Response) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/Application.php:386 {
yii\base\Application->run() …
› $this->state = self::STATE_HANDLING_REQUEST;
› $response = $this->handleRequest($this->getRequest());
›
}
/var/www/h9/data/www/www/index.php:26 {
›
› (new yii\web\Application($config))->run();
›
}
}
}
trace: {
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:642 {
yii\db\Connection->open() …
›
› throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:1030 {
yii\db\Connection->getMasterPdo() …
› {
› $this->open();
› return $this->pdo;
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Connection.php:1017 {
yii\db\Connection->getSlavePdo($fallbackToMaster = true) …
› if ($db === null) {
› return $fallbackToMaster ? $this->getMasterPdo() : null;
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Command.php:265 {
yii\sphinx\Command->prepare($forRead = null) …
› if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) {
› $pdo = $this->db->getSlavePdo();
› } else {
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Command.php:1154 {
yii\db\Command->queryInternal($method, $fetchMode = null) …
›
› $this->prepare(true);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Command.php:401 {
yii\db\Command->queryAll($fetchMode = null) …
› {
› return $this->queryInternal('fetchAll', $fetchMode);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:256 {
yii\sphinx\Schema->findIndexes() …
›
› return $this->db->createCommand($sql)->queryAll();
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:240 {
yii\sphinx\Schema->initIndexesInfo() …
› $this->_indexTypes = [];
› $indexes = $this->findIndexes();
› foreach ($indexes as $index) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:227 {
yii\sphinx\Schema->getIndexTypes($refresh = false) …
› if (!isset($this->_indexTypes) || $refresh) {
› $this->initIndexesInfo();
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:114 {
yii\sphinx\Schema->resolveIndexType($index) …
› {
› $indexTypes = $this->getIndexTypes();
› $index->type = array_key_exists($index->name, $indexTypes) ? $indexTypes[$index->name] : 'unknown';
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:90 {
yii\sphinx\Schema->loadIndexSchema($name) …
› $this->resolveIndexNames($index, $name);
› $this->resolveIndexType($index);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Schema.php:152 {
yii\sphinx\Schema->getIndexSchema($name, $refresh = false) …
›
› return $this->_indexes[$name] = $this->loadIndexSchema($realName);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Connection.php:89 {
yii\sphinx\Connection->getIndexSchema($name, $refresh = false) …
› {
› return $this->getSchema()->getIndexSchema($name, $refresh);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/QueryBuilder.php:1294 {
yii\sphinx\QueryBuilder->getIndexSchemas($indexes) …
› foreach ($indexes as $indexName) {
› $index = $this->db->getIndexSchema($indexName);
› if ($index !== null) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/QueryBuilder.php:602 {
yii\sphinx\QueryBuilder->buildWhere($indexes, $condition, &$params, $match = null) …
› }
› $indexSchemas = $this->getIndexSchemas($indexes);
› $where = $this->buildCondition($indexSchemas, $condition, $params);
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/QueryBuilder.php:128 {
yii\sphinx\QueryBuilder->build($query, $params = []) …
› $this->buildFrom($from, $params),
› $this->buildWhere($from, $query->where, $params, $query->match),
› $this->buildGroupBy($query->groupBy, $query->groupLimit),
}
/var/www/h9/data/www/vendor/yiisoft/yii2-sphinx/src/Query.php:180 {
yii\sphinx\Query->createCommand($db = null) …
› $db = $this->getConnection();
› list ($sql, $params) = $db->getQueryBuilder()->build($this);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2/db/Query.php:248 {
yii\db\Query->all($db = null) …
› }
› $rows = $this->createCommand($db)->queryAll();
› return $this->populate($rows);
}
/var/www/h9/data/www/models/Firm.php:1199 {
app\models\Firm::search($geo, $filter, $pager = null, $returnCount = false) …
› \t->limit(5000)
› \t->all();
› $searchIds = ArrayHelper::getColumn($rows, 'id');
}
/var/www/h9/data/www/models/Firm.php:1285 {
app\models\Firm::count($geo, $filter) …
› public static function count($geo, $filter){
› \treturn Firm::search($geo, $filter, null, true);
› }
}
/var/www/h9/data/www/components/BpkApiService.php:97 {
app\components\BpkApiService->prepareOtherDominants($od) …
› $filter->search = $dominant['name'];\r
› $firmCount = Firm::count($this->geo, $filter);\r
› if($firmCount > 0) {\r
}
/var/www/h9/data/www/components/BpkApiService.php:79 {
app\components\BpkApiService->prepareData($data) …
› $result['main_dominant'] = $data['main_dominant'];\r
› $result['other_dominants'] = $this->prepareOtherDominants($data['other_dominants']);\r
› //$result['main_dominant_core'] = array_slice($data['main_dominant_core'], 0, rand(5, 10));\r
}
/var/www/h9/data/www/components/BpkApiService.php:67 {
app\components\BpkApiService->getKotelCores() …
› \r
› return $this->prepareData($data);\r
› }\r
}
/var/www/h9/data/www/components/BpkApiService.php:43 {
app\components\BpkApiService->getCores() …
› try {\r
› $cores = $this->getKotelCores();\r
› } catch (\Exception $exception) {\r
}
/var/www/h9/data/www/controllers/SiteController.php:1285 {
app\controllers\SiteController->actionFirm($countryUrl, $cityUrl, $groupUrl, $firmUrl) …
› $bpkApiService = new BpkApiService($firm, $geo);
› $cores = $bpkApiService->getCores();
›
}
app\controllers\SiteController->actionFirm() {}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/InlineAction.php:57 {
yii\base\InlineAction->runWithParams($params) …
›
› return call_user_func_array([$this->controller, $this->actionMethod], $args);
› }
}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/Controller.php:180 {
yii\base\Controller->runAction($id, $params = []) …
› // run the action
› $result = $action->runWithParams($params);
›
}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/Module.php:528 {
yii\base\Module->runAction($route, $params = []) …
› Yii::$app->controller = $controller;
› $result = $controller->runAction($actionID, $params);
› if ($oldController !== null) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2/web/Application.php:103 {
yii\web\Application->handleRequest($request) …
› $this->requestedRoute = $route;
› $result = $this->runAction($route, $params);
› if ($result instanceof Response) {
}
/var/www/h9/data/www/vendor/yiisoft/yii2/base/Application.php:386 {
yii\base\Application->run() …
› $this->state = self::STATE_HANDLING_REQUEST;
› $response = $this->handleRequest($this->getRequest());
›
}
/var/www/h9/data/www/www/index.php:26 {
›
› (new yii\web\Application($config))->run();
›
}
}
}