EMongoException

EMongoDB failed to open connection: Failed to connect to: 10.15.200.48:27017: Remote server has closed the connection

/export/www/www.xbiao.com/wwwroot/protected/extensions/YiiMongoDbSuite/EMongoDB.php(152)

140                         'connect'=>$this->autoConnect,
141                         'persist'=>$this->persistentConnection
142                     ));
143                 else
144                     $this->_mongoConnection = new Mongo($this->connectionString, array(
145                         'connect'=>$this->autoConnect,
146                     ));
147 
148                 return $this->_mongoConnection;
149             }
150             catch(MongoConnectionException $e)
151             {
152                 throw new EMongoException(Yii::t(
153                     'yii',
154                     'EMongoDB failed to open connection: {error}',
155                     array('{error}'=>$e->getMessage())
156                 ), $e->getCode());
157             }
158         }
159         else
160             return $this->_mongoConnection;
161     }
162 
163     /**
164      * Set the connection

Stack Trace

#0
+
 /export/www/www.xbiao.com/wwwroot/protected/extensions/YiiMongoDbSuite/EMongoDB.php(181): EMongoDB->getConnection()
176      * @since v1.0
177      */
178     public function getDbInstance()
179     {
180         if($this->_mongoDb === null)
181             return $this->_mongoDb = $this->getConnection()->selectDB($this->dbName);
182         else
183             return $this->_mongoDb;
184     }
185 
186     /**
#1
+
 /export/www/www.xbiao.com/wwwroot/protected/models/Jewellery.php(634): EMongoDB->getDbInstance()
629     }
630     
631     //===========================================================================
632     //mongo链接
633     public static function mongodb($collection){
634         return Yii::app()->jewellery->getDbInstance()->selectCollection($collection);
635     }
636     public static function mongodbxin(){
637         return Yii::app()->jewellery->getDbInstance();
638     }
639     
#2
+
 /export/www/www.xbiao.com/wwwroot/protected/models/Jewellery.php(172): Jewellery::mongodb("search_cache")
167         
168         //缓存机制
169         $all=array();
170         $is_up=true;
171         if(count($params)<=3 || $total>=1000){
172             $mongodb2=self::mongodb('search_cache');
173             $res=$mongodb2->findOne(array('_id'=>$condition['arr_str']));
174             if($res){
175                 $all=$res['search'];
176                 $is_up=false;
177             }
2024-03-28 16:27:58 Apache Yii Framework/1.1.7