[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. // 記錄數(shù)據(jù)庫連接信息
  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=localhost...', 'sxxyyxgs_com', 'xNyf8AHCKci7xWCN', [0, 2, 0, ...]) in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2022
  4. at Connection->initConnect(false) in Connection.php line 644
  5. at Connection->query('SELECT * FROM `zq_ar...', ['ThinkBind_1_' => [6, 1]], false, false) in Connection.php line 923
  6. at Connection->select(object(Query)) in Query.php line 3007
  7. at Query->select() in Index.php line 147
  8. at Index->Index()
  9. at ReflectionMethod->invokeArgs(object(Index), []) in Container.php line 395
  10. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), ['wap' => 'View', 'a' => 'index', 'aid' => '866257.shtml']) in Module.php line 132
  11. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  12. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  13. at Middleware->think\{closure}(object(Request))
  14. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  15. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  16. at Module->exec() in Dispatch.php line 168
  17. at Dispatch->run() in App.php line 432
  18. at App->think\{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)) in App.php line 435
  23. at App->run() in index.php line 21

Environment Variables

GET Data
wap View
a index
aid 866257.shtml
POST Dataempty
Filesempty
Cookies
t 92d7540e476b153862b4ea2356ede7b3
r 8148
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST yjqxbzzx.cn
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
HTTP_REFERER http://www.baidu.com
HTTP_COOKIE t=92d7540e476b153862b4ea2356ede7b3; r=8148
HTTP_ACCEPT_LANGUAGE zh-CN,zh
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONTENT_TYPE application/x-www-form-urlencoded; Charset=UTF-8
HTTP_CONNECTION Keep-Alive
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME sxxyyxgs.com
SERVER_PORT 80
SERVER_ADDR 172.31.111.1
REMOTE_PORT 59071
REMOTE_ADDR 104.247.196.98
SERVER_SOFTWARE nginx/1.19.8
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/sxxyyxgs.com/public
DOCUMENT_URI /index.php
REQUEST_URI /m=home&wap=View&a=index&aid=866257.shtml
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE application/x-www-form-urlencoded; Charset=UTF-8
REQUEST_METHOD GET
QUERY_STRING s=/m=home&wap=View&a=index&aid=866257.shtml
SCRIPT_FILENAME /www/wwwroot/sxxyyxgs.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1731055571.9158
REQUEST_TIME 1731055571
Environment Variablesempty
ThinkPHP Constants
EXT .php
DS /
THINK_PATH /www/wwwroot/sxxyyxgs.com/thinkphp/
LIB_PATH /www/wwwroot/sxxyyxgs.com/thinkphp/library/
CORE_PATH /www/wwwroot/sxxyyxgs.com/thinkphp/library/think/
TRAIT_PATH /www/wwwroot/sxxyyxgs.com/thinkphp/library/traits/
APP_PATH /www/wwwroot/sxxyyxgs.com/public/
ROOT_PATH /www/wwwroot/sxxyyxgs.com/