[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...', 'root', 'H0pe@2337877~', [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('SELECT `urlname` FRO...', ['ThinkBind_1_643991424_' => [1, 1], 'ThinkBind_2_1292104280_' => [2, 1]], false, true) in Connection.php line 1299
  6. at Connection->value(object(Query), ['urlname'], null) in Query.php line 614
  7. at Query->value('urlname') in common.php line 244
  8. at getChildNav_Details('article') in 6594a09d75b28b790ff20ecde59df8b2.php line 105
  9. at include('D:\wwwroot\beisenzx....') in File.php line 59
  10. at File->read('D:\wwwroot\beisenzx....', ['city' => 'Zhengzhou', 'urlname' => 'hyxw129', 'cityName' => '郑州', ...]) in Template.php line 226
  11. at Template->fetch('D:\wwwroot\beisenzx....', ['city' => 'Zhengzhou', 'urlname' => 'hyxw129', 'cityName' => '郑州', ...], []) in Think.php line 93
  12. at Think->fetch('D:\wwwroot\beisenzx....', ['city' => 'Zhengzhou', 'urlname' => 'hyxw129', 'cityName' => '郑州', ...], []) in View.php line 192
  13. at View->fetch('', ['city' => 'Zhengzhou', 'urlname' => 'hyxw129', 'cityName' => '郑州', ...], [], false) in View.php line 42
  14. at View->output('') in Response.php line 396
  15. at Response->getContent() in Response.php line 128
  16. at Response->send() in index.php line 29

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\
SYSTEMROOT C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
PHPRC D:/phpstudy_pro/Extensions/php/php7.0.9nts
_FCGI_SHUTDOWN_EVENT_ 11544
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /art/Zhengzhou/hyxw129.html
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /art/Zhengzhou/hyxw129.html
REMOTE_PORT 41522
SCRIPT_FILENAME D:/wwwroot/beisenzx.cn/public/index.php
SERVER_ADMIN admin@example.com
CONTEXT_DOCUMENT_ROOT D:/wwwroot/beisenzx.cn/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT D:/wwwroot/beisenzx.cn/public
REMOTE_ADDR 3.238.195.81
SERVER_PORT 80
SERVER_ADDR 172.16.238.225
SERVER_NAME www.beisenzx.cn
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
SystemRoot C:\Windows
HTTP_HOST www.beisenzx.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
REDIRECT_PATH_INFO art/Zhengzhou/hyxw129.html
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711665136.895
REQUEST_TIME 1711665136
Environment Variablesempty
ThinkPHP Constants
DS \
APP_PATH D:\wwwroot\beisenzx.cn\public/../application/
CONF_PATH D:\wwwroot\beisenzx.cn\public/../config/
PUBILC_PATH D:\wwwroot\beisenzx.cn\public/
ROOT_PATH D:\wwwroot\beisenzx.cn\public
CACHE_PATH D:\wwwroot\beisenzx.cn\public/../runtime/
CONFIG_PATH D:\wwwroot\beisenzx.cn\public/../config/
UPLOAD_PATH uploads