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(181): Jewellery::mongodb("jewellery_search")
176                 $is_up=false;
177             }
178         }
179         
180         //统计总数
181         $mongodb=self::mongodb('jewellery_search');
182         $total=$mongodb->count($params);
183         $totalPage=ceil($total/$pagesize);
184         //查询条件非空,计算显示的url
185         if(empty($all)){
186             $all_new=array();
2024-03-28 18:45:28 Apache Yii Framework/1.1.7