[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=localhost...', 'jxzbjt_ce0791_co', 'DsZpZBZSGwCzDecK', [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('SHOW COLUMNS FROM `c...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('crh_sortclass') in Connection.php line 377
  7. at Connection->getTableInfo('crh_sortclass', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('crh_sortclass') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [object(Expression)]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [object(Expression)]]) in Builder.php line 989
  11. at Builder->select(object(Query)) in Connection.php line 1366
  12. at Connection->column(object(Query), '*', 'id') in Query.php line 608
  13. at Query->column('*', 'id') in Base.php line 13
  14. at Base->initialize() in Controller.php line 68
  15. at Controller->__construct(object(App))
  16. at ReflectionClass->newInstanceArgs([object(App)]) in Container.php line 439
  17. at Container->invokeClass('app\index\controller...', []) in Container.php line 284
  18. at Container->make('app\index\controller...', true) in App.php line 725
  19. at App->controller('news', 'controller', false, 'Error') in Module.php line 95
  20. at Module->exec() in Dispatch.php line 168
  21. at Dispatch->run() in App.php line 432
  22. at App->think\{closure}(object(Request), object(Closure), null)
  23. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  24. at Middleware->think\{closure}(object(Request))
  25. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  26. at Middleware->dispatch(object(Request)) in App.php line 435
  27. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
PHPSESSID cuq33vrbdtb1t50va75totvnk0
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
REDIRECT_STATUS 200
proxy-nokeepalive 1
HTTP_USER_AGENT Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
HTTP_HOST www.zhengbang.com
HTTP_ACCEPT */*
HTTP_COOKIE PHPSESSID=cuq33vrbdtb1t50va75totvnk0
HTTP_ACCEPT_CHARSET utf-8
CONTENT_LENGTH 0
CONTENT_TYPE application/x-www-form-urlencoded
PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
LD_LIBRARY_PATH /www/server/apache/lib
SERVER_SIGNATURE <address>Apache Server at www.zhengbang.com Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.zhengbang.com
SERVER_ADDR 211.149.224.47
SERVER_PORT 80
REMOTE_ADDR 45.158.221.134
DOCUMENT_ROOT /www/wwwroot/zbjt/public
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /www/wwwroot/zbjt/public
SERVER_ADMIN webmaster@example.com
SCRIPT_FILENAME /www/wwwroot/zbjt/public/index.php
REMOTE_PORT 58008
REDIRECT_URL /news/show/index.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI //news/show/index.html
SCRIPT_NAME /index.php
PATH_INFO /news/show/index.html
PATH_TRANSLATED redirect:/index.php/news/show/index.html/show/index.html
PHP_SELF /index.php/news/show/index.html
REQUEST_TIME_FLOAT 1610550700.3799
REQUEST_TIME 1610550700
Environment Variablesempty
ThinkPHP Constantsempty
分享到:QQ空间|新浪微博|腾讯微博|人人网|微信