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/OfertaController.php(66): CActiveRecord->find(array("condition" => "id_of_situacao IN (1,2,3) AND id_of_oferta =3507"))
61             $this->redirect('/oferta/'.$_REQUEST['url']."/".$_REQUEST['id']);
62         }
63     }
64     
65     public function actionOfertaId($id){
66         $model = OfOferta::model()->find(array('condition' => 'id_of_situacao IN (1,2,3) AND id_of_oferta ='.$id));
67         
68         if (isset($model)) {
69             $this->render('index', array(
70                 'model' => $model));
71         }
#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 13:20:31 Apache/2.4.52 (Amazon) OpenSSL/1.0.2k-fips PHP/5.4.45 Yii Framework/1.1.15