CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1129] Host '172.31.32.82' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

/var/www/framework/db/CDbConnection.php(382)

370                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
371             try
372             {
373                 Yii::trace('Opening DB connection','system.db.CDbConnection');
374                 $this->_pdo=$this->createPdoInstance();
375                 $this->initConnection($this->_pdo);
376                 $this->_active=true;
377             }
378             catch(PDOException $e)
379             {
380                 if(YII_DEBUG)
381                 {
382                     throw new CDbException('CDbConnection failed to open the DB connection: '.
383                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
384                 }
385                 else
386                 {
387                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
388                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
389                 }
390             }
391         }
392     }
393 
394     /**

Stack Trace

#7
+
 /var/www/html/SiteOfertas/controllers/CategoriaController.php(22): CActiveRecord->find(array("condition" => "slug LIKE :CAT", "params" => array(":CAT" => "comer-e-beber")))
17 
18         if ($categoria != '' && strlen($categoria) > 0) {
19             $modelCat = OfCategoria::model()->find(array(
20                 'condition' => 'slug LIKE :CAT',
21                 'params' => array(':CAT' => $categoria)
22             ));
23             $this->busca_params->categoria = $modelCat;
24         }
25 
26         if (isset($_POST['input-cidade']) && ((int) $_POST['input-cidade']) > 0) {
27             $id_cidade = $_POST['input-cidade'];
#17
+
 /var/www/html/ofertas.php(92): CApplication->run()
87 //    'condition' => 'id_ofc_situacao = 1',
88 //    'order' => 'porcentagem DESC'
89 //    ));
90 //Yii::app()->user->setState('desconto', $modelOfc->porcentagem);
91 
92 $app->run();
2024-03-28 14:40:43 Apache/2.4.52 (Amazon) OpenSSL/1.0.2k-fips PHP/5.4.45 Yii Framework/1.1.15