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/views/site/especiais/festival2020.php(20): CActiveRecord->findAll(array("condition" => "id_of_situacao = 1 and id_of_oferta IN (5084,5083,5082,5096,5085...", "order" => "id_of_oferta DESC"))
15     <?php $ofertas = OfOferta::model()->findAll(array(
16                 'condition' => 'id_of_situacao = 1 and id_of_oferta IN ('.  implode(',', array(
17                     5084, 5083, 5082, 5096, 5085, 5079, 5074, 5055, 5056, 5044, 5064, 5060, 5050, 5025, 5023, 5022, 5036, 5013
18                 )).')',
19                 'order' => 'id_of_oferta DESC'
20         ));
21         shuffle($ofertas);
22          ?>
23     
24     <?php
25 
#12
+
 /var/www/html/SiteOfertas/controllers/SiteController.php(249): CController->render("especiais/festival2020")
244     }
245     public function actionfanfest2018(){
246         $this->render('especiais/fanfest2018');
247     }
248     public function actionfestival(){
249         $this->render('especiais/festival2020');
250     }
251     public function actiondelivery(){
252         $this->render('especiais/delivery');
253     }
254 
#20
+
 /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-29 10:58:13 Apache/2.4.52 (Amazon) OpenSSL/1.0.2k-fips PHP/5.4.45 Yii Framework/1.1.15