[1040] PDOException in Connection.php line 295

SQLSTATE[08004] [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('mysql:host=localhost...', 'cnovv_cn', 'Y3kRbDFZp8CPM2tK', [0, 2, 0, ...]) in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect(false) in Connection.php line 348
  5. at Connection->query('SHOW COLUMNS FROM `l...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('ls_forumcate') in Query.php line 1921
  7. at Query->getTableInfo('ls_forumcate', 'type') in Query.php line 1969
  8. at Query->getFieldsType('ls_forumcate') in Query.php line 1975
  9. at Query->getFieldsBind('ls_forumcate') in Builder.php line 270
  10. at Builder->buildWhere(['AND' => ['tid' => 0, 'show' => 1]], ['multi' => ['AND' => ['tid' => [0], 'show' => [1]]], 'where' => ['AND' => ['tid' => 0, 'show' => 1]], 'order' => ['sort desc'], ...]) in Builder.php line 240
  11. at Builder->parseWhere(['AND' => ['tid' => 0, 'show' => 1]], ['multi' => ['AND' => ['tid' => [0], 'show' => [1]]], 'where' => ['AND' => ['tid' => 0, 'show' => 1]], 'order' => ['sort desc'], ...]) in Builder.php line 719
  12. at Builder->select(['multi' => ['AND' => ['tid' => [0], 'show' => [1]]], 'where' => ['AND' => ['tid' => 0, 'show' => 1]], 'order' => ['sort desc'], ...]) in Query.php line 2511
  13. at Query->select() in HomeBase.php line 32
  14. at HomeBase->_initialize() in Articles.php line 17
  15. at Articles->_initialize() in Controller.php line 59
  16. at Controller->__construct(object(Request))
  17. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  18. at App::invokeClass('app\index\controller...') in Loader.php line 479
  19. at Loader::controller('articles', 'controller', false, 'Error') in App.php line 581
  20. at App::module(['index', 'articles', 'lists'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  21. at App::exec(['type' => 'module', 'module' => ['index', 'articles', 'lists'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  22. at App::run() in start.php line 19
  23. at require('/www/wwwroot/cnovv.c...') in index.php line 23

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/cnovv.cn/index.php
QUERY_STRING
s=/lists/zhide.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/lists/zhide.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/cnovv.cn
SERVER_PROTOCOL
HTTP/2.0
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.20.1
REMOTE_ADDR
34.230.66.177
REMOTE_PORT
34788
SERVER_ADDR
121.127.253.126
SERVER_PORT
443
SERVER_NAME
cnovv.cn
REDIRECT_STATUS
200
PATH_INFO
/lists/zhide.html
HTTP_HOST
www.cnovv.cn
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710834215.9139
REQUEST_TIME
1710834215
Environment Variables
empty

ThinkPHP Constants

WEB_URL
CBOPEN
1
APP_PATH
/www/wwwroot/cnovv.cn/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1710834215.9152
THINK_START_MEM
264976
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/cnovv.cn/thinkphp/
LIB_PATH
/www/wwwroot/cnovv.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/cnovv.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/cnovv.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/cnovv.cn/
EXTEND_PATH
/www/wwwroot/cnovv.cn/extend/
VENDOR_PATH
/www/wwwroot/cnovv.cn/vendor/
RUNTIME_PATH
/www/wwwroot/cnovv.cn/runtime/
LOG_PATH
/www/wwwroot/cnovv.cn/runtime/log/
CACHE_PATH
/www/wwwroot/cnovv.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/cnovv.cn/runtime/temp/
CONF_PATH
/www/wwwroot/cnovv.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
BEHAVIOR_PATH
app\common\behavior\
ADDON_DIR_NAME
addons
ADDON_PATH
/www/wwwroot/cnovv.cn/addons/
JF_NAME
金币
DEF_COVER
/public/images/default_cover.png