[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() in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2024
  4. at Connection->initConnect() in Connection.php line 644
  5. at Connection->query() in Mysql.php line 90
  6. at Mysql->getFields() in Connection.php line 377
  7. at Connection->getTableInfo() in Connection.php line 414
  8. at Connection->getPk() in Query.php line 2474
  9. at Query->getPk() in Connection.php line 793
  10. at Connection->find() in Query.php line 3152
  11. at Query->find() in CommonBase.php line 39
  12. at CommonBase->initChongwuInfo() in CommonBase.php line 20
  13. at CommonBase->initialize() in Base.php line 12
  14. at Base->initialize() in Controller.php line 68
  15. at Controller->__construct()
  16. at ReflectionClass->newInstanceArgs() in Container.php line 439
  17. at Container->invokeClass() in Container.php line 284
  18. at Container->make() in App.php line 723
  19. at App->controller() in Module.php line 94
  20. at Module->exec() in Dispatch.php line 168
  21. at Dispatch->run() in App.php line 432
  22. at App->think\{closure}()
  23. at call_user_func_array() in Middleware.php line 185
  24. at Middleware->think\{closure}()
  25. at call_user_func() in Middleware.php line 130
  26. at Middleware->dispatch() in App.php line 435
  27. at App->run() in init.php line 21

Environment Variables

GET Data
cate_id 3
cate_name mcrc
domain kenisijuanmaomao
page 1
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT */*
HTTP_HOST 2.chongso.com
PATH_INFO /index/index/lists
REDIRECT_STATUS 200
SERVER_NAME 2.chongso.com
SERVER_PORT 443
SERVER_ADDR 127.0.0.1
REMOTE_PORT 55498
REMOTE_ADDR 127.0.0.1
SERVER_SOFTWARE nginx/1.24.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/2.chongso.com/public
DOCUMENT_URI /init.php/index/index/lists
REQUEST_URI /init.php/index/index/lists?cate_id=3&cate_name=mcrc&domain=kenisijuanmaomao&page=1
SCRIPT_NAME /init.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING cate_id=3&cate_name=mcrc&domain=kenisijuanmaomao&page=1
SCRIPT_FILENAME /www/wwwroot/2.chongso.com/public/init.php
FCGI_ROLE RESPONDER
PHP_SELF /init.php/index/index/lists
REQUEST_TIME_FLOAT 1716923608.7734
REQUEST_TIME 1716923608
Environment Variablesempty
ThinkPHP Constantsempty