[2002] PDOException in Connection.php line 295

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 295
  2. at PDO->__construct() in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect() in Connection.php line 348
  5. at Connection->query() in Mysql.php line 65
  6. at Mysql->getFields() in Query.php line 1921
  7. at Query->getTableInfo() in Query.php line 1955
  8. at Query->getPk() in Query.php line 2639
  9. at Query->find() in Index.php line 111
  10. at Index->det()
  11. at ReflectionMethod->invokeArgs() in App.php line 343
  12. at App::invokeMethod() in App.php line 611
  13. at App::module() in App.php line 456
  14. at App::exec() in App.php line 139
  15. at App::run() in start.php line 19
  16. at require('/www/wwwroot/pp.micp...') in index.php line 17

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
PATH_TRANSLATED
redirect:/index.php/index/index/det/id/WB8E6DzT5eDiTb4.html/index/det/id/WB8E6DzT5eDiTb4.html
PATH_INFO
/index/index/det/id/WB8E6DzT5eDiTb4.html
SCRIPT_NAME
/index.php
REQUEST_URI
/index/index/det/id/WB8E6DzT5eDiTb4.html
QUERY_STRING
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_URL
/index/index/det/id/WB8E6DzT5eDiTb4.html
REMOTE_PORT
49484
SCRIPT_FILENAME
/www/wwwroot/pp.micp.org.cn/public/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/pp.micp.org.cn/public/
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/pp.micp.org.cn/public/
REMOTE_ADDR
18.97.9.171
SERVER_PORT
80
SERVER_ADDR
103.229.124.253
SERVER_NAME
pp.micp.org.cn
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at pp.micp.org.cn Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
pp.micp.org.cn
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive
1
REDIRECT_STATUS
200
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/index/index/det/id/WB8E6DzT5eDiTb4.html
REQUEST_TIME_FLOAT
1770874581.6718
REQUEST_TIME
1770874581
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/pp.micp.org.cn/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1770874581.6723
THINK_START_MEM
407128
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/pp.micp.org.cn/thinkphp/
LIB_PATH
/www/wwwroot/pp.micp.org.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/pp.micp.org.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/pp.micp.org.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/pp.micp.org.cn/
EXTEND_PATH
/www/wwwroot/pp.micp.org.cn/extend/
VENDOR_PATH
/www/wwwroot/pp.micp.org.cn/vendor/
RUNTIME_PATH
/www/wwwroot/pp.micp.org.cn/runtime/
LOG_PATH
/www/wwwroot/pp.micp.org.cn/runtime/log/
CACHE_PATH
/www/wwwroot/pp.micp.org.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/pp.micp.org.cn/runtime/temp/
CONF_PATH
/www/wwwroot/pp.micp.org.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
url
/index/index/det/id/WB8E6DzT5eDiTb4.html
ref
Resource
ent
CCBot/2.0 (https://commoncrawl.org/faq/)
site
http://jsc.25jsc-3.cc:81/
url8
http://pp.micp.org.cn
road
/index/index/det/id/WB8E6DzT5eDiTb4.html
regs
@baiduspider|Sogou@i
area
false