[1040] PDOException in Connection.php line 528

SQLSTATE[HY000] [1040] Too many connections

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

Call Stack

  1. in Connection.php line 528
  2. at PDO->__construct('mysql:host=127.0.0.1...', '38fan', 'dtYrPcZKHAkL8Fxp', [0, 2, 0, ...]) in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2024
  4. at Connection->initConnect(false) in Connection.php line 644
  5. at Connection->query('SHOW COLUMNS FROM `w...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`wed_article_categor...') in Connection.php line 377
  7. at Connection->getTableInfo('wed_article_category', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('wed_article_category') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [['ishidden', '=', 0]]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [['ishidden', '=', 0]]]) in Builder.php line 998
  11. at Builder->select(object(Query)) in Connection.php line 1370
  12. at Connection->column(object(Query), ['id', 'pid', 'dir', ...], 'id') in Query.php line 628
  13. at Query->column('id,pid,dir,name', 'id') in ArticleCategory.php line 26
  14. at ArticleCategory->all_() in IndexController.php line 44
  15. at IndexController->_empty()
  16. at ReflectionMethod->invokeArgs(object(IndexController), []) in Container.php line 395
  17. at Container->invokeReflectMethod(object(IndexController), object(ReflectionMethod), ['index']) in Module.php line 131
  18. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  19. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  20. at Middleware->think\{closure}(object(Request))
  21. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  22. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  23. at Module->exec() in Dispatch.php line 168
  24. at Dispatch->run() in App.php line 432
  25. at App->think\{closure}(object(Request), object(Closure), null)
  26. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  27. at Middleware->think\{closure}(object(Request))
  28. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  29. at Middleware->dispatch(object(Request)) in App.php line 435
  30. at App->run() in index.php line 31

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.38fan.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.38fan.com
SERVER_PORT 443
SERVER_ADDR 172.18.232.233
REMOTE_PORT 45694
REMOTE_ADDR 100.26.35.111
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/38fan_com/public
DOCUMENT_URI /index.php
REQUEST_URI /saihong/list_196_5.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/saihong/list_196_5.html&
SCRIPT_FILENAME /www/wwwroot/38fan_com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711623363.3889
REQUEST_TIME 1711623363
Environment Variablesempty
ThinkPHP Constants
WEB_PATH /www/wwwroot/38fan_com/public/
CACHE_TAG article_38fan
CONFIG_INI_FILE /www/wwwroot/38fan_com/default.ini
CACHE_CONFIG_INI_KEY 627b586003f0acb04cb886a26c7bca9a
CACHE_TIME 80000
IS_CACHE false
HOME_CACHE_TIME 3600