[1040] PDOException in Connection.php line 528

SQLSTATE[08004] [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...', 'new', 'wa44Hy8h2bNEePWP', [0, 2, 0, ...]) in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2026
  4. at Connection->initConnect(false) in Connection.php line 644
  5. at Connection->query('SHOW COLUMNS FROM `y...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`yc_domain`') in Connection.php line 377
  7. at Connection->getTableInfo('yc_domain', 'pk') in Connection.php line 414
  8. at Connection->getPk('yc_domain') in Query.php line 2453
  9. at Query->getPk(['where' => ['AND' => [['domain', '=', '0101-music.com']]], 'table' => 'yc_domain', 'field' => '*', ...]) in Connection.php line 793
  10. at Connection->find(object(Query)) in Query.php line 3131
  11. at Query->find() in Get.php line 16
  12. at Get->getRouterConfig() in route.php line 18
  13. at include('/www/wwwroot/28.com/...') in App.php line 556
  14. at App->routeInit() in App.php line 259
  15. at App->initialize() in App.php line 379
  16. at App->run() in index.php line 27

Environment Variables

GET Data
s /nzqnq
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_X_FORWARDED_FOR 52.14.150.55
HTTP_HOST 0101-music.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME 28.com
SERVER_PORT 8080
SERVER_ADDR 127.0.0.1
REMOTE_PORT 57092
REMOTE_ADDR 127.0.0.1
SERVER_SOFTWARE nginx/1.25.3
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/28.com/public
DOCUMENT_URI /index.php
REQUEST_URI /nzqnq
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/nzqnq
SCRIPT_FILENAME /www/wwwroot/28.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1713459557.5355
REQUEST_TIME 1713459557
Environment Variablesempty
ThinkPHP Constants
LOTUS_ROOT /www/wwwroot/28.com/public/../
APP_PATH /www/wwwroot/28.com/public/../application/
DS /
LOTUS_VERSION 5.0