[1040] PDOException in Connection.php line 295

SQLSTATE[HY000] [1040] Too many connections

  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 1969
  8. at Query->getFieldsType() in Query.php line 1975
  9. at Query->getFieldsBind() in Builder.php line 270
  10. at Builder->buildWhere() in Builder.php line 240
  11. at Builder->parseWhere() in Builder.php line 720
  12. at Builder->select() in Query.php line 2462
  13. at Query->getPdo() in Query.php line 441
  14. at Query->value() in Query.php line 576
  15. at Query->aggregate() in Query.php line 551
  16. at Query->count() in Vod.php line 48
  17. at Vod->listData() in Vod.php line 584
  18. at Vod->listCacheData() in bfde01397e8918e2224c34877fc8c059.php line 163
  19. at include('/www/wwwroot/zhanqun...') in File.php line 53
  20. at File->read() in Template.php line 188
  21. at Template->fetch() in Think.php line 89
  22. at Think->fetch() in View.php line 177
  23. at View->fetch() in Controller.php line 130
  24. at Controller->fetch() in All.php line 144
  25. at All->label_fetch() in Vod.php line 27
  26. at Vod->show()
  27. at ReflectionMethod->invokeArgs() in App.php line 343
  28. at App::invokeMethod() in App.php line 613
  29. at App::module() in App.php line 456
  30. at App::exec() in App.php line 139
  31. at App::run() in start.php line 19
  32. at require('/www/wwwroot/zhanqun...') in index.php line 127

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_X_FORWARDED_PROTO
http
HTTP_CF_VISITOR
{"scheme":"http"}
HTTP_CF_IPCOUNTRY
US
HTTP_CF_CONNECTING_IP
216.73.216.153
HTTP_CDN_LOOP
cloudflare; loops=1
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_ACCEPT
*/*
HTTP_CONNECTION
Keep-Alive
HTTP_CF_RAY
9cb10b343d26df63-CMH
HTTP_X_FORWARDED_FOR
10.6.13.46,216.73.216.153
HTTP_CACHE_CONTROL
max-age=259200
HTTP_VIA
1.1 squid-proxy-5b5d847c96-v22vn (squid/6.13)
HTTP_ACCEPT_ENCODING
gzip
HTTP_HOST
www.153515.com
PATH_INFO
/vodshow_66--hits------52---.html
REDIRECT_STATUS
200
SERVER_NAME
zhanqun.com
SERVER_PORT
80
SERVER_ADDR
64.32.26.218
REMOTE_PORT
14004
REMOTE_ADDR
104.23.243.26
SERVER_SOFTWARE
nginx/1.24.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/zhanqun.com
DOCUMENT_URI
/index.php
REQUEST_URI
/vodshow_66--hits------52---.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/vodshow_66--hits------52---.html
SCRIPT_FILENAME
/www/wwwroot/zhanqun.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1770615749.8371
REQUEST_TIME
1770615749
Environment Variables
empty

ThinkPHP Constants

ROOT_PATH
/www/wwwroot/zhanqun.com/
APP_PATH
/www/wwwroot/zhanqun.com/application/
MAC_COMM
/www/wwwroot/zhanqun.com/application/common/common/
MAC_HOME_COMM
/www/wwwroot/zhanqun.com/application/index/common/
MAC_ADMIN_COMM
/www/wwwroot/zhanqun.com/application/admin/common/
MAC_START_TIME
1770615749.8374
BIND_MODULE
index
ENTRANCE
index
IN_FILE
/index.php
THINK_VERSION
5.0.24
THINK_START_TIME
1770615749.8376
THINK_START_MEM
365456
EXT
.php
EXTTXT
.txt
MACLINE
verifymac
DS
/
THINK_PATH
/www/wwwroot/zhanqun.com/thinkphp/
LIB_PATH
/www/wwwroot/zhanqun.com/thinkphp/library/
CORE_PATH
/www/wwwroot/zhanqun.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/zhanqun.com/thinkphp/library/traits/
MACERRORF
error
EXTEND_PATH
/www/wwwroot/zhanqun.com/extend/
VENDOR_PATH
/www/wwwroot/zhanqun.com/vendor/
RUNTIME_PATH
/www/wwwroot/zhanqun.com/runtime/
LOG_PATH
/www/wwwroot/zhanqun.com/runtime/log/
CACHE_PATH
/www/wwwroot/zhanqun.com/runtime/cache/
TEMP_PATH
/www/wwwroot/zhanqun.com/runtime/temp/
CONF_PATH
/www/wwwroot/zhanqun.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/zhanqun.com/addons/
MAX_CACHE_ITEMS
1000
MAC_URL
http://www.maccms.la/
MAC_NAME
苹果CMS
MAC_PATH
/
MAC_MOB
0
MAC_ROOT_TEMPLATE
/www/wwwroot/zhanqun.com/template/ZY012/html/
MAC_PATH_TEMPLATE
/template/ZY012/
MAC_PATH_TPL
/template/ZY012/html/
MAC_PATH_ADS
/template/ZY012/ads/
MAC_PAGE_SP
_
MAC_PLAYER_SORT
1
MAC_ADDON_PATH
/www/wwwroot/zhanqun.com/addons/
MAC_ADDON_PATH_STATIC
/www/wwwroot/zhanqun.com/static/addons/