CDbException

CDbConnection n'a pu ouvrir la connexion à la base de données : SQLSTATE[HY000] [1203] User Sql93582_new already has more than 'max_user_connections' active connections

/var/www/www.cloud-hotel.it/framework/db/CDbConnection.php(382)

370                 throw new CDbException(Yii::t('yii','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(Yii::t('yii','CDbConnection failed to open the DB connection: {error}',
383                         array('{error}'=>$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(Yii::t('yii','CDbConnection failed to open the DB connection.'),(int)$e->getCode(),$e->errorInfo);
389                 }
390             }
391         }
392     }
393 
394     /**

Stack Trace

#7
+
 /var/www/www.cloud-hotel.it/protected/models/Hotel.php(533): CActiveRecord::model("Hotel")
528      * @param string $className active record class name.
529      * @return Hotel the static model class
530      */
531     public static function model($className=__CLASS__)
532     {
533         return parent::model($className);
534     }
535 
536     /**
537      * @return string the associated database table name
538      */
#8
+
 /var/www/www.cloud-hotel.it/protected/controllers/HotelController.php(684): Hotel::model()
679      * If the data model is not found, an HTTP exception will be raised.
680      * @param integer the ID of the model to be loaded
681      */
682     public function loadModel($id)
683     {
684         $model=Hotel::model()->findByPk($id);
685         if($model===null)
686             throw new CHttpException(404,'The requested page does not exist.');
687         return $model;
688     }
689 
#9
+
 /var/www/www.cloud-hotel.it/protected/controllers/HotelController.php(746): HotelController->loadModel("33")
741 
742         $model=new ContactFormHotel('siteContact');
743 
744         $model->newsletter = 1;   //Ricevi Newsletter ?
745 
746         $hotel = $this->loadModel($hid);
747 
748         if($hotel->status == Hotel::STATUS_DELETED ){
749             throw new CHttpException(404,'The requested page does not exist. Struttura cancellata.');
750             Yii::app()->end();
751         }
2024-03-28 20:59:47 Apache/2.4.41 (Ubuntu) Yii Framework/1.1.9