Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

乐天堂fun88备用网站_fun88官网_乐天堂fun88备用

Solr HTTP error: HTTP request failed, Connection timed out after 5001 milliseconds

  • 1. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Adapter/Curl.php at line 159
    150151152153154155156157158159160161162163164165166167168
                             * @param resource $handle
         *
         * @throws HttpException
         */
        public function check($data, $headers, $handle)
        {
            // if there is no data and there are no headers it's a total failure,
            // a connection to the host was impossible.
            if (empty($data) && 0 == count($headers)) {
                throw new HttpException('HTTP request failed, '.curl_error($handle));
            }
        }
     
        /**
         * Execute request.
         *
         * @param Request  $request
         * @param Endpoint $endpoint
         *
                    
  • 2. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Adapter/Curl.php at line 54 – Solarium\Core\Client\Adapter\Curl::check('', [], resource)
    48495051525354555657585960
                                    $headers[] = 'HTTP/1.1 '.$info['http_code'].' OK';
            } else {
                $headers = [];
                $data = '';
            }
     
            $this->check($data, $headers, $handle);
            curl_close($handle);
     
            return new Response($data, $headers);
            // @codeCoverageIgnoreEnd
        }
     
                    
  • 3. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Adapter/Curl.php at line 177 – Solarium\Core\Client\Adapter\Curl::getResponse(resource, false)
    171172173174175176177178179180181182183
                            protected function getData($request, $endpoint)
        {
            // @codeCoverageIgnoreStart
            $handle = $this->createHandle($request, $endpoint);
            $httpResponse = curl_exec($handle);
     
            return $this->getResponse($handle, $httpResponse);
            // @codeCoverageIgnoreEnd
        }
     
        /**
         * Initialization hook.
         *
                    
  • 4. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Adapter/Curl.php at line 30 – Solarium\Core\Client\Adapter\Curl::getData(Solarium\Core\Client\Request, Solarium\Core\Client\Endpoint)
    24252627282930313233343536
                             * @param Endpoint $endpoint
         *
         * @return Response
         */
        public function execute($request, $endpoint)
        {
            return $this->getData($request, $endpoint);
        }
     
        /**
         * Get the response for a curl handle.
         *
         * @param resource $handle
                    
  • 5. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Client.php at line 789 – Solarium\Core\Client\Adapter\Curl::execute(Solarium\Core\Client\Request, Solarium\Core\Client\Endpoint)
    783784785786787788789790791792793794795
                         
            $event = new PreExecuteRequestEvent($request, $endpoint);
            $this->eventDispatcher->dispatch(Events::PRE_EXECUTE_REQUEST, $event);
            if (null !== $event->getResponse()) {
                $response = $event->getResponse(); //a plugin result overrules the standard execution result
            } else {
                $response = $this->getAdapter()->execute($request, $endpoint);
            }
     
            $this->eventDispatcher->dispatch(
                Events::POST_EXECUTE_REQUEST,
                new PostExecuteRequestEvent($request, $endpoint, $response)
            );
                    
  • 6. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Client.php at line 758 – Solarium\Core\Client\Client::executeRequest(Solarium\Core\Client\Request, Solarium\Core\Client\Endpoint)
    752753754755756757758759760761762763764
                                $this->eventDispatcher->dispatch(Events::PRE_EXECUTE, $event);
            if (null !== $event->getResult()) {
                return $event->getResult();
            }
     
            $request = $this->createRequest($query);
            $response = $this->executeRequest($request, $endpoint);
            $result = $this->createResult($query, $response);
     
            $this->eventDispatcher->dispatch(
                Events::POST_EXECUTE,
                new PostExecuteEvent($query, $result)
            );
                    
  • 7. in /opt/www/meizhaike/vendor/solarium/solarium/src/Core/Client/Client.php at line 849 – Solarium\Core\Client\Client::execute(Solarium\QueryType\Update\Query\Query, null)
    843844845846847848849850851852853854855
                             * @param Endpoint|string|null                                  $endpoint
         *
         * @return \Solarium\QueryType\Update\Result
         */
        public function update(QueryInterface $query, $endpoint = null)
        {
            return $this->execute($query, $endpoint);
        }
     
        /**
         * Execute a select query.
         *
         * This is a convenience method that forwards the query to the
                    
  • 8. in /opt/www/meizhaike/common/models/News.php at line 126 – Solarium\Core\Client\Client::update(Solarium\QueryType\Update\Query\Query)
    120121122123124125126127128129130131132
                                $doc1->searchtitle = $this->searchtitle;
            $doc1->status = $this->status;
            $doc1->category_id = $this->category_id;
     
            $update->addDocument($doc1);
            $update->addCommit();
            $solr->update($update);
        }
     
        /**
         * 根据资讯id获取资讯内容表里面的内容
         *
         * @param integer $news_id
                    
  • 9. in /opt/www/meizhaike/vendor/yiisoft/yii2/db/BaseActiveRecord.php at line 817 – common\models\News::afterSave(false, ['view_count' => 918])
    811812813814815816817818819820821822823
                         
            $changedAttributes = [];
            foreach ($values as $name => $value) {
                $changedAttributes[$name] = isset($this->_oldAttributes[$name]) ? $this->_oldAttributes[$name] : null;
                $this->_oldAttributes[$name] = $value;
            }
            $this->afterSave(false, $changedAttributes);
     
            return $rows;
        }
     
        /**
         * Updates one or several counter columns for the current AR object.
                    
  • 10. in /opt/www/meizhaike/vendor/yiisoft/yii2/db/ActiveRecord.php at line 625 yii\db\BaseActiveRecord::updateInternal(null)
    619620621622623624625626627628629630631
                                if ($runValidation && !$this->validate($attributeNames)) {
                Yii::info('Model not updated due to validation error.', __METHOD__);
                return false;
            }
     
            if (!$this->isTransactional(self::OP_UPDATE)) {
                return $this->updateInternal($attributeNames);
            }
     
            $transaction = static::getDb()->beginTransaction();
            try {
                $result = $this->updateInternal($attributeNames);
                if ($result === false) {
                    
  • 11. in /opt/www/meizhaike/vendor/yiisoft/yii2/db/BaseActiveRecord.php at line 673 yii\db\ActiveRecord::update(true, null)
    667668669670671672673674675676677678679
                            public function save($runValidation = true, $attributeNames = null)
        {
            if ($this->getIsNewRecord()) {
                return $this->insert($runValidation, $attributeNames);
            }
     
            return $this->update($runValidation, $attributeNames) !== false;
        }
     
        /**
         * Saves the changes to this active record into the associated database table.
         *
         * This method performs the following steps in order:
                    
  • 12. in /opt/www/meizhaike/common/models/News.php at line 350 yii\db\BaseActiveRecord::save()
    344345346347348349350351352353354355356
                                    //声明的必填字段需要存在,否则无法插入、修改数据
                $model = News::findOne($news_id);
                if (!$model || $model->status == 1) {
                    return false;
                }
                $model->view_count += 1;
                $model->save();
     
                $data = ArrayHelper::toArray($model);
                $title = $data['title'];
     
                //获取资讯内容
                $data['content'] = NewsContent::find()->select(['content'])->where(['news_id' => $news_id])->asArray()->one()['content'];
                    
  • 13. in /opt/www/meizhaike/frontend/controllers/PictureController.php at line 552 – common\models\News::getNewsDetails(48059)
    546547548549550551552553554555556557558
                                }
     
            /*
             * 案例类资讯做跳转 Todo
             */
            $news = new News;
            $news_info = $news->getNewsDetails($newsId);
            $category = Category::getIdByPinyin('anli');
            $child_ids = Category::getChildrenIdsByCategoryId($category['id']);
            $child_ids[] = $category['id'];
            if(!in_array($news_info['category_id'], $child_ids)) {
                return $this->redirect(Yii::$app->params['news_domain'] . "zixun/anli-{$news_info['id']}.html");
            }
                    
  • 14. frontend\controllers\PictureController::actionPictureNewsDetail()
  • 15. in /opt/www/meizhaike/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([frontend\controllers\PictureController, 'actionPictureNewsDetail'], [])
    515253545556575859
                                $args = $this->controller->bindActionParams($this, $params);
            Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
            if (Yii::$app->requestedParams === null) {
                Yii::$app->requestedParams = $args;
            }
     
            return call_user_func_array([$this->controller, $this->actionMethod], $args);
        }
    }
                    
  • 16. in /opt/www/meizhaike/vendor/yiisoft/yii2/base/Controller.php at line 157 yii\base\InlineAction::runWithParams(['news_id' => '48059'])
    151152153154155156157158159160161162163
                                }
     
            $result = null;
     
            if ($runAction && $this->beforeAction($action)) {
                // run the action
                $result = $action->runWithParams($params);
     
                $result = $this->afterAction($action, $result);
     
                // call afterAction on modules
                foreach ($modules as $module) {
                    /* @var $module Module */
                    
  • 17. in /opt/www/meizhaike/vendor/yiisoft/yii2/base/Module.php at line 528 yii\base\Controller::runAction('picture-news-detail', ['news_id' => '48059'])
    522523524525526527528529530531532533534
                                $parts = $this->createController($route);
            if (is_array($parts)) {
                /* @var $controller Controller */
                list($controller, $actionID) = $parts;
                $oldController = Yii::$app->controller;
                Yii::$app->controller = $controller;
                $result = $controller->runAction($actionID, $params);
                if ($oldController !== null) {
                    Yii::$app->controller = $oldController;
                }
     
                return $result;
            }
                    
  • 18. in /opt/www/meizhaike/vendor/yiisoft/yii2/web/Application.php at line 103 yii\base\Module::runAction('picture/picture-news-detail', ['news_id' => '48059'])
    979899100101102103104105106107108109
                                    $params = $this->catchAll;
                unset($params[0]);
            }
            try {
                Yii::debug("Route requested: '$route'", __METHOD__);
                $this->requestedRoute = $route;
                $result = $this->runAction($route, $params);
                if ($result instanceof Response) {
                    return $result;
                }
     
                $response = $this->getResponse();
                if ($result !== null) {
                    
  • 19. in /opt/www/meizhaike/vendor/yiisoft/yii2/base/Application.php at line 386 yii\web\Application::handleRequest(yii\web\Request)
    380381382383384385386387388389390391392
                            {
            try {
                $this->state = self::STATE_BEFORE_REQUEST;
                $this->trigger(self::EVENT_BEFORE_REQUEST);
     
                $this->state = self::STATE_HANDLING_REQUEST;
                $response = $this->handleRequest($this->getRequest());
     
                $this->state = self::STATE_AFTER_REQUEST;
                $this->trigger(self::EVENT_AFTER_REQUEST);
     
                $this->state = self::STATE_SENDING_RESPONSE;
                $response->send();
                    
  • 20. in /opt/www/meizhaike/frontend/web/index.php at line 17 yii\base\Application::run()
    11121314151617
                            require(__DIR__ . '/../../common/config/main.php'),
        require(__DIR__ . '/../../common/config/main-local.php'),
        require(__DIR__ . '/../config/main.php'),
        require(__DIR__ . '/../config/main-local.php')
    );
     
    (new yii\web\Application($config))->run();
                    
  • $_GET = [
        'news_id' => '48059',
    ];