CDbException

CDbConnection failed to open the DB connection: SQLSTATE[08004] [1040] Too many connections

S:\WebSites\WinPredict\Prod\Site\WebSite\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
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\protected\widgets\grid\specialEvents.php(34): CActiveRecord->find(CDbCriteria)
29             $criteria = new CDbCriteria;
30             $criteria->condition = 't.isActive = 1 AND t.sportId = '.$sportId;
31             $criteria->order = 't.order ASC';
32             $criteria->limit = 1;
33             
34             $bannerSport = BannersSportPage::model()->find($criteria);
35         }
36 
37         if ($this->getListItem == 0) {
38             $this->render(self::TEMPLATE_PATH . '.sport_header', array(
39                 'specialEvents' => $specialEvents,
#8
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\protected\modules\events\views\sport\index.php(23): SpecialEvents->index()
18     </script>
19     <?php
20 }
21 
22 // Sport header
23 $this->widget('application.widgets.grid.specialEvents', array('sportId' => $sport[0]->SportId))->index();
24 ?>
25 <ul class="breadcrumbs clearfix">
26     <li><a href="/events/sport/<?php echo $sport[0]->SportId; ?>"><?php echo $sport[0]->Name; ?></a></li>
27 
28     <?php
#13
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\protected\modules\events\controllers\SportController.php(142): CController->render("index", array("sport" => array(stdClass), "categories" => array(stdClass, stdClass, stdClass, stdClass, ...), "CategoryId" => 171, "BookmakerId" => 0, ...))
137                 'BookmakerId' => $BookmakerId,
138                 'data' => $data,
139                 'filter' => $filter,
140                 'SearchString' => $SearchString,
141                 'bookmakers' => $bookmakers,
142             ));
143         }
144     }
145 
146     protected function processPageRequest($param = 'page') {
147         if (Yii::app()->request->isAjaxRequest && isset($_POST[$param]))
2024-04-18 21:28:07 Microsoft-IIS/7.5 Yii Framework/1.1.15