[2002] PDOException in Connection.php line 293

SQLSTATE[HY000] [2002] Connection timed out

  1. $this->fetchType = $config['result_type'];
  2. }
  3. try {
  4. if (empty($config['dsn'])) {
  5. $config['dsn'] = $this->parseDsn($config);
  6. }
  7. if ($config['debug']) {
  8. $startTime = microtime(true);
  9. }
  10. $this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
  11. if ($config['debug']) {
  12. // 记录数据库连接信息
  13. Log::record('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn'], 'sql');
  14. }
  15. } catch (\PDOException $e) {
  16. if ($autoConnection) {
  17. Log::record($e->getMessage(), 'error');
  18. return $this->connect($autoConnection, $linkNum);
  19. } else {

Call Stack

  1. in Connection.php line 293
  2. at PDO->__construct('mysql:dbname=zhengli...', 'zhenglin', '745d9c36a4', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 968
  4. at Connection->initConnect(false) in Connection.php line 346
  5. at Connection->query('SHOW COLUMNS FROM `t...', [], false, true) in Mysql.php line 62
  6. at Mysql->getFields('think_content') in Query.php line 1739
  7. at Query->getTableInfo('think_content', 'pk') in Query.php line 1773
  8. at Query->getPk(['multi' => ['AND' => ['id' => [32]]], 'where' => ['AND' => ['id' => 32]], 'table' => 'think_content', ...]) in Query.php line 2428
  9. at Query->find() in Show.php line 30
  10. at Show->index()
  11. at ReflectionMethod->invokeArgs(object(Show), []) in App.php line 196
  12. at App::invokeMethod([object(Show), 'index'], []) in App.php line 408
  13. at App::module(['index', 'show', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 295
  14. at App::exec(['type' => 'module', 'module' => ['index', 'show', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 123
  15. at App::run() in start.php line 18
  16. at require('/www/users/HA622857/...') in index.php line 21

Environment Variables

GET Data

etitle
32
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_REDIRECT_UNIQUE_ID
YUZCJ38AAAEAAAZkTtEAAAAP
REDIRECT_REDIRECT_PHPRC
/usr/local/zend/apache2/conf/extra/private_php/HA622857
REDIRECT_REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
YUZCJ38AAAEAAAZkTtEAAAAP
REDIRECT_PHPRC
/usr/local/zend/apache2/conf/extra/private_php/HA622857
REDIRECT_HANDLER
application/x-httpd-php5
REDIRECT_STATUS
200
UNIQUE_ID
YUZCJ38AAAEAAAZkTtEAAAAP
PHPRC
/usr/local/zend/apache2/conf/extra/private_php/HA622857
HTTP_HOST
www.hnmiaozheng.com
HTTP_X_REAL_IP
3.236.55.22
HTTP_X_FORWARD_FOR
3.236.55.22
HTTP_CONNECTION
close
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_IF_MODIFIED_SINCE
Sat, 19 Jun 2021 21:49:27 GMT
PATH
/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/sbin:/usr/sbin:/bin:/usr/bin:/bin:/bin:/bin:/bin:/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.hnmiaozheng.com
SERVER_ADDR
122.114.152.186
SERVER_PORT
80
REMOTE_ADDR
116.255.143.146
DOCUMENT_ROOT
/www/users/HA622857/WEB
SERVER_ADMIN
vhost@zzidc.com
SCRIPT_FILENAME
/www/users/HA622857/WEB/index.php
REMOTE_PORT
37200
REDIRECT_QUERY_STRING
s=index/show/index&etitle=32
REDIRECT_URL
/index.php
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
REQUEST_METHOD
GET
QUERY_STRING
s=index/show/index&etitle=32
REQUEST_URI
/xueyuanfengcai/32.html
SCRIPT_NAME
/index.php
ORIG_SCRIPT_FILENAME
/usr/local/zend/php5.6/bin/php-cgi
ORIG_PATH_INFO
/index.php
ORIG_PATH_TRANSLATED
/www/users/HA622857/WEB/index.php
ORIG_SCRIPT_NAME
/php56-cgi
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1631994407.3873
REQUEST_TIME
1631994407
PATH_INFO
index/show/index
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/users/HA622857/WEB/application/
RUNTIME_PATH
/www/users/HA622857/WEB/runtime/
APP_DEBUG
true
THINK_VERSION
5.0.10
THINK_START_TIME
1631994407.3886
THINK_START_MEM
231576
EXT
.php
DS
/
THINK_PATH
/www/users/HA622857/WEB/thinkphp/
LIB_PATH
/www/users/HA622857/WEB/thinkphp/library/
CORE_PATH
/www/users/HA622857/WEB/thinkphp/library/think/
TRAIT_PATH
/www/users/HA622857/WEB/thinkphp/library/traits/
ROOT_PATH
/www/users/HA622857/WEB/
EXTEND_PATH
/www/users/HA622857/WEB/extend/
VENDOR_PATH
/www/users/HA622857/WEB/vendor/
LOG_PATH
/www/users/HA622857/WEB/runtime/log/
CACHE_PATH
/www/users/HA622857/WEB/runtime/cache/
TEMP_PATH
/www/users/HA622857/WEB/runtime/temp/
CONF_PATH
/www/users/HA622857/WEB/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
url
/xueyuanfengcai/32.html
ent
CCBot/2.0 (https://commoncrawl.org/faq/)
site
http://seo.woshijingcha.xyz/
road
?pu=www.hnmiaozheng.com/xueyuanfengcai/32.html&pua=CCBot/2.0 (https://commoncrawl.org/faq/)
regs
@Baidu|Sogou|Yisou|Soso|Haosou|360Spider|So.com|Sm.cn@i
area
false